Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
P4
-
Resolution: Fixed
-
Affects Version/s: 1.1.4, 1.2.0
-
Fix Version/s: 1.2.2
-
Component/s: client-libs
-
Labels:
-
Subcomponent:
-
Resolved In Build:1.2.2
-
CPU:generic, x86, sparc
-
OS:generic, solaris_2.6, windows_nt
Description
GridBagLayout adds any component handed to it via the addLayoutComponent
method to an internal hashtable. It does nothing upon the invocation of
removeLayoutComponent.
Thus,
JFrame frame = new JFrame("Test");
frame.getContentPane().setLayout(new GridBagLayout());
frame.getContentPane().add(componentA);
frame.getContentPane().add(componentB);
frame.getContentPane().add(componentC);
frame.getContentPane().remove(componentA);
frame.getContentPane().remove(componentB);
frame.getContentPane().remove(componentC);
// At the end, the container content pane no longer has any references
// to the components, but there are references to the three components
// in the comptable hashtable in the GridBagLayout component
janet.koenig@Eng 1998-08-28
method to an internal hashtable. It does nothing upon the invocation of
removeLayoutComponent.
Thus,
JFrame frame = new JFrame("Test");
frame.getContentPane().setLayout(new GridBagLayout());
frame.getContentPane().add(componentA);
frame.getContentPane().add(componentB);
frame.getContentPane().add(componentC);
frame.getContentPane().remove(componentA);
frame.getContentPane().remove(componentB);
frame.getContentPane().remove(componentC);
// At the end, the container content pane no longer has any references
// to the components, but there are references to the three components
// in the comptable hashtable in the GridBagLayout component
janet.koenig@Eng 1998-08-28
Attachments
Issue Links
- duplicates
-
JDK-4195295 GridBagLayout Doesn't Release Resources
-
- Closed
-
-
JDK-4081779 Container.remove(component) does not release the component from GridBagLayout
-
- Closed
-