I have a frame which contains two button. when i click on the first button, the second button gets hidden & i am displaying a window location according to setLocationRelativeTo of the hidden component. when i do this the window is displayed to the center of the screen, then i take the window location & comparing with the actual center of the screen , when i do the return value of the window location is wrong.
This scenario pass in jdk6.0 b104 build, it even pass in 6u10_b23 also. but fails in jdk7. I tested from jdk7 b23 to jdk7 pit build 27.
Step to reproduce:
--------------------
1) Run the attached testcase.
2) Click on the first button. Observe that second button gets hidden & a window with yellow color is displayed to the center of the screen. Observe on the screen value of the console . If you see the failed message , then the bug is reproduced.
Attached the testcase.