-
Enhancement
-
Resolution: Fixed
-
P2
-
7
-
b143
-
generic, x86
-
generic, solaris_10, windows_xp, windows_vista, windows_7
-
Verified
The fix for 6852592 made the invalidate() method stop on the nearest validate root when invalidating a component hierarchy. Initially we relied on the common pattern used in Swing applications: when they change a layout-related information, they (or the Swing library) should call the revalidate() method, e.g.:
component.setSize(50, 50);
component.revalidate();
In this case the revalidate() method would dispatch a validate() call on the nearest validate root, thus validating the invalid part of the component hierarchy.
However, it turns out that some Swing applications rely on the old behavior of the invalidate() method and simply call:
frame.validate();
instead of the revalidate() call. The frame is usually their top-level component (such as a JFrame or a JDialog). The fix for 6852592 made this call a no-op because the frame never gets invalidated.
component.setSize(50, 50);
component.revalidate();
In this case the revalidate() method would dispatch a validate() call on the nearest validate root, thus validating the invalid part of the component hierarchy.
However, it turns out that some Swing applications rely on the old behavior of the invalidate() method and simply call:
frame.validate();
instead of the revalidate() call. The frame is usually their top-level component (such as a JFrame or a JDialog). The fix for 6852592 made this call a no-op because the frame never gets invalidated.
- duplicates
-
JDK-7041823 Multiple regressions caused by the fix for #6852592
- Closed
-
JDK-7028648 Java 3D does not display with Java 1.7
- Closed
- relates to
-
JDK-7045247 Regression: Plugin: invalidate/validate issues in AWT applet
- Closed
-
JDK-6852592 invalidate() must be smarter
- Resolved