JDK-6769511 : PIT : AWT components are invisible for a while after frame is moved & menu items are visible
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u12
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2008-11-10
  • Updated: 2011-01-19
  • Resolved: 2008-12-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u12 b02Fixed 7Fixed
Description
I have a JFrame, which contains JScrollPane. The JScrollPane contains swingbutton & few AWT components. The JFrame contains menu. When the frame is visible , i move the frame to center of the screen & press F10, when the menu items are visible , the awt components are invisible. Once the menuitem is close, the AWT componets are visible.  Moving the frame & openning the menu is one of the most common scenario in gui. 

Step to reproduced:-
--------------------
1) Run the attached testcase.
2) when the frame is visible. Move the frame to center or any other location on the screen.
3) Press F10 or Click on the menu, so that menu item can be seen.
4) Observe that AWT Components are invisible or not rendered correctly. If you see the same then the bug is reproduced.  

I tested this on 6u12 pit b01 on windows vista home premium. I have attached the screen shot .

Comments
EVALUATION Apparently the mixing code calcualates shapes in the screen coordinate system rather than in the window coordinate system as we supposed it does. The Component.getLocationOnWindow() method should stop when it reaches a parent object that is an instance of the Window class. This fixes the problem.
11-11-2008

EVALUATION Described problem is only observed for the first menu showing after moving the frame. Subsequent menu showing/hiding works correctly. Looks like a minor bug in hw/lw mixing implementation.
11-11-2008