Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6702119

window.getLocationOnScreen() returns a wrong value when it is displayed to a hidden component

    XMLWordPrintable

Details

    • x86
    • windows_vista

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              art Artem Ananiev (Inactive)
              lpremkumsunw Lawrence Premkumar1 (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: