-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.4.2
-
x86
-
linux
FULL PRODUCT VERSION :
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
and
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux daisy.home.lan 2.4.22-26mdk #1 Wed Jan 7 10:47:21 MST 2004 i686 unknown unknown GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The removeLayoutComponent() method in the BasicSpinnerUI.SpinnerLayout class contains the following implementation:
public void removeLayoutComponent(Component c) {
if (c == nextButton) {
c = null;
}
else if (c == previousButton) {
previousButton = null;
}
else if (c == editor) {
editor = null;
}
}
Note that the 'true' condition for the first 'if' clause is a no-op. The statement should be:
nextButton = null;
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Problem is self-evident in source code.
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
and
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux daisy.home.lan 2.4.22-26mdk #1 Wed Jan 7 10:47:21 MST 2004 i686 unknown unknown GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The removeLayoutComponent() method in the BasicSpinnerUI.SpinnerLayout class contains the following implementation:
public void removeLayoutComponent(Component c) {
if (c == nextButton) {
c = null;
}
else if (c == previousButton) {
previousButton = null;
}
else if (c == editor) {
editor = null;
}
}
Note that the 'true' condition for the first 'if' clause is a no-op. The statement should be:
nextButton = null;
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Problem is self-evident in source code.
REPRODUCIBILITY :
This bug can be reproduced always.
- duplicates
-
JDK-6514599 JSpinner default layout manager does not allow removing "Next" button
- Closed