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

Owned windows placed strangely if owning Frame is on secondary display

XMLWordPrintable

    • x86
    • windows_2000

      Reproducible on Win2000 and Win98, 1.3, 1.3.1, and 1.4.


      The attached test case demonstrates the problem:
      The "CenterWindow" window is the owner of all dialogs. It has buttons for bringing up two other windows, "ToolkitMethod" and "GraphicsConfig" method. "ToolkitMethod" has a button for bringing up Dialogs centered on the screen using Toolkit.getScreenSize() method, as well as a button for bringing up a Frame-centered dialog. The "GraphicsConfig" can bring up a screen-centered dialog using GraphicsConfiguration.getBounds(). Note that "GraphicsConfig" dialogs center properly on the second monitor, but "ToolkitMethod" dialogs do not. But this is not the bug.

      Clicking the "Screen-Centered Dialog" button on the ToolkitMethod prints out some diagnostic info to the console, and places a dialog in the center of the primary display. The centered Dialog is always placed at the same coordinates, as proven by the console messages. The bug is, if you drag the Dialog's owning frame (CenterWindow) onto a secondary display, and then click "Screen-Centered Dialog", even though the Dialog is placed at the same coordinates, it is placed centered over its owning Frame. Definitely a bug.

            art Artem Ananiev (Inactive)
            bchristi Brent Christian
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: