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

GraphicsEnvironment.getMaximumWindowBounds() does not work correctly

XMLWordPrintable

      GraphicsEnvironment.getMaximumWindowBounds() does not take into account screen insets - system menu and task bar.
      It just return screen size.

      JDK: jdk 6 (6u131b06 was tested). (not applicable to 7, 8, 9)
      Tests:
      AWT_UndecoratedFrame/Automated/AWT/FullSize AWT_UndecoratedFrame/Automated/Swing/FullSize

      OS specific: Solaris; (tested on Solaris 11). Works good on Windows
      Regression: no (tested on jdk1.6.0_105b15 - also fails)
      Steps to reproduce:

      Dimension dimensionOfFullScreen = Toolkit.getDefaultToolkit()
                          .getScreenSize();
      Dimension dimensionOfMaxWindowBounds = GraphicsEnvironment
                        .getLocalGraphicsEnvironment().getMaximumWindowBounds()
                          .getSize();

      dimensionOfMaxWindowBounds should differ from dimensionOfFullScreen if there are menu bar or task bar.

            dmarkov Dmitry Markov
            ampopov Alexander Popov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: