JDK-6326164 : JWindow does not resize the components inside when it gets resized programmatically, XToolkit
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux_sun
  • CPU: x86
  • Submitted: 2005-09-20
  • Updated: 2005-09-26
  • Resolved: 2005-09-26
Related Reports
Duplicate :  
Description
I have added a JComponent to a JWindow and Jcomponent contains some Volatile Images rendered on it. After making the window visible, I am trying to resize the window programmatically by calling setSize(). I have added a ComponentListener to JComponent to listen to comp resize events to re-create the images to the new size of the component. When calling setSize(), JWindow is actually resizing but the JComponent is not, unless i call JWindow.invalidate() and validate() explicitly after the resize.

This behavior is seen on SolSparc10-JDS / Linux-GNOME. The requirement of revalidating the window contents does not arise when I use JDialog or JFrame. JDialog /JFrame work fine even when I don't call invalidate /validate on the same platform.

This is reproducible at least since 1.5FCS. This is noticed only on XToolkit and Not reproducible on Win32. JWindow properly resizes the JComponent added to it on WinXP even when I don't call invalidate/validate explicitly.

I have attached a sample test. Execute the sample test. THe JWindow will be shown and will be resized automatically. If you don't see any COMPONENT_RESIZED event on the console or if the duke does not resize to the new window size, the bug is reproduced.

Comments
EVALUATION This bug is reproducible on 1.5.0 and 6.0b01, is not reproducible on 6.0b42-6.0b50. See 6318144 for details
26-09-2005