JDK-6777348 : PIT : Internal frame menu goes behind AWT Canvas in 6u12 b02 pit build
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u12
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2008-11-27
  • Updated: 2011-01-19
  • Resolved: 2008-12-03
Related Reports
Duplicate :  
Relates :  
Description
I have a JFrame which contains desktopPane. The DesktopPane contains two internal frame, which intern contains AWT Canvas. When i invoke the menu of the intenal frame.The menus goes behind the canvas, this works fine in 6u12 b01 promoted build, but fails from 6u12 b02 pit build. Hence its a regression.  I have attached the screen shot of both 6u12 b01 promoted build & 6u12 b02 pit build. 

Step to reproduced:-
-------------------
1) Run the attached testcase either in nimbus or windows look and feel
-Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel  for windows laf
 -Dswing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel for nimbus laf
2) Move the red internal frame away from the yellow internal frame.
3) Click on the internal frame's java icon. Observe that menus goes behind the canvas, if you see the same then the bug is reproduced.

I tested this on windows xp sp3 with 6u12 b02 pit build.

Comments
EVALUATION This is another regression of the fix for 6768230 (HW/LW mixing code slows down resize performance). One of the changes introduced by the fix for 6768230 is that the HW/LW mixing code ignores the "apply shape" requests for the component if the component is invalid or any ancestor of the component is invalid. In the testcase when the user clicks on the icon to show JPopupMenu, Swing adds the JPopupMenu in the JLayeredPane container. Acoording to the current implementation Container.addImpl makes call to Component.invalidate() and this method invalidates all ancestors of the component. So, the HW/LW mixing code ignores the "apply shape" requests when the popup menu is shown and the Swing code invalidates only direct container of the popup menu and doesn't touch other containers and so the HW/LW mixing code ignores all following "apply shape" requests until any of the containers of the component is invalid (this never happens). The problem will be fixed as a part of the fix for 6777370. We will need to make sure that the test will work with 6u10 b03.
02-12-2008