-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
beta
-
sparc
-
solaris_2.6
Name: nkR10003 Date: 07/22/2000
Tool bar add/remove operation pair changes previously installed button border
%java -fullversion
java full version "1.4.0beta-b23"
------------------example--------------------
//HandlerTests.java
//
import javax.swing.*;
import javax.swing.border.*;
public class HandlerTests {
public static void main(String argv[]) {
JToolBar toolBar = new JToolBar();
JButton button = new JButton("Test");
button.setBorder(new EmptyBorder(5,5,5,5));
Border border = button.getBorder();
toolBar.add(button);
toolBar.remove(button);
if (!button.getBorder().equals(border)) {
System.out.println("border is: " + button.getBorder());
System.out.println("border was: " + border);
System.out.println("Method componentRemoved does not set border back");
} else {
System.out.println("Passed OKAY");
}
System.exit(0);
}
}
----------------output:----------------------
border is: javax.swing.border.CompoundBorder@27391d
border was: javax.swing.border.EmptyBorder@16ab4e
Method componentRemoved does not set border back
---------------------------------------------
======================================================================