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

getMaximumWindowBounds() should return the dimensions of a maximixed window on all platforms

    XMLWordPrintable

Details

    Description

      Currently, on Windows the dimensions of a maximized AWT Frame are not equal to those returned by GraphicsEnvironment.getMaximumWindowBounds(). Instead, they are equal to Toolkit.getScreenSize().

      On the contrary, on Linux the dimensions of a maximized AWT Frame are equal to getMaximumWindowBounds() and not equal to getScreenSize().

      We have a functional test which checks the dimensions of a maximized frame. It passes on Windows because it checks the dimensions against getScreenSize(). For the same reason it fails on Linux. If we change the test so it checks against getMaximumWindowBounds() then it passes on Linux but fails on Windows. Therefore, we believe there's a disrepancy between those 2 APIs and is not a test problem.

      The attached program demonstrates the issue. It logs the dimensions returned by getMaximumWindowBounds() and getScreenSize() and then logs the real dimensions of a maximized AWT frame.

      Attachments

        Issue Links

          Activity

            People

              achung Alisen Chung
              akulyakh Alexander Kulyakhtin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: