-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.4.0
-
x86
-
windows_2000
Name: gm110360 Date: 08/21/2002
FULL PRODUCT VERSION :
java version "1.4.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_0
Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
ADDITIONAL OPERATING SYSTEMS :
This is os independent, as it is a bug in java.awt.Container
A DESCRIPTION OF THE PROBLEM :
java.awt.Container does not set maxSize to null on
invalidate. This effectively means that once a
LayoutManager2 reports a maximum layout size from the
maximumLayoutSize() method, it *never* has an opportunity
to report it again, because even when you call invalidate()
on the component, the protected member maxSize is never set
to null.
here is the code that is broken in java.awt.Container:
public Dimension getMaximumSize() {
/* Avoid grabbing the lock if a reasonable cached
size value
* is available.
*/
Dimension dim = maxSize;
if (dim != null && isValid()) {
return dim;
}
if (layoutMgr instanceof LayoutManager2) {
synchronized (getTreeLock()) {
LayoutManager2 lm = (LayoutManager2)
layoutMgr;
maxSize = lm.maximumLayoutSize(this);
}
} else {
maxSize = super.getMaximumSize();
}
return maxSize;
}
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER WORKAROUND :
override isValid() on component and always return false.
(Review ID: 160490)
======================================================================