swingx
  1. swingx
  2. SWINGX-1128

WindowUtils.getPointForCentering() does not recognize multi-monitors

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.6.3
    • Component/s: Util
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,128

      Description

      Latest change in SWINGX-1079 breaks my code when passing in the top JFrame on a
      multi-monitor system.

      After reviewing the code if you change the following in the
      getUsableDeviceBounds() function...

      Window owner = window.getOwner();

      to

      Component owner = SwingUtilities.getRoot((Component)window);

      the code works for me.

        Activity

        Hide
        Karl Schaefer added a comment -

        SWINGX-1128: Unowned windows always center on their current graphics configuration. Owned windows center on their parents graphics configuration unless it is already showing, in which case they center on their current graphics configuration.

        swingx-core/src/main/java/org/jdesktop/swingx/util/WindowUtils.java
        swingx-core/src/test/java/org/jdesktop/swingx/util/WindowUtilsTest.java

        Committed revision 3945.

        Show
        Karl Schaefer added a comment - SWINGX-1128 : Unowned windows always center on their current graphics configuration. Owned windows center on their parents graphics configuration unless it is already showing, in which case they center on their current graphics configuration. swingx-core/src/main/java/org/jdesktop/swingx/util/WindowUtils.java swingx-core/src/test/java/org/jdesktop/swingx/util/WindowUtilsTest.java Committed revision 3945.

          People

          • Assignee:
            Karl Schaefer
            Reporter:
            orbisman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: