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

Toolkit.getScreenSize() returns incorrect size on Windows single screen systems

XMLWordPrintable

    • x86_64
    • windows_7

      ADDITIONAL SYSTEM INFORMATION :
      Windows 7, 64 Bit, OpenJDK 11+28

      A DESCRIPTION OF THE PROBLEM :
      In OpenJDK 11 the method Toolkit.getScreenSize() returns an incorrect size on a Windows 7 single screen system.


      REGRESSION : Last worked in version 8u181

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile and run the program below with OpenJDK 11+28
      on a Windows 7 64 bit system with single screen



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      My Notebook has a screen size of 1600x900 pixel.
      Expected output of the sample programm is:

      java.awt.Dimension[width=1600,height=900]

      ACTUAL -
      java.awt.Dimension[width=1280,height=720]

      In OracleJDK 1.8.0_161 the correct screen size is returned:
      java.awt.Dimension[width=1600,height=900]


      ---------- BEGIN SOURCE ----------
      public class ShowScreenSize {
        public static void main( String[] args ) {
          System.out.println( java.awt.Toolkit.getDefaultToolkit().getScreenSize() );
        }
      }

      ---------- END SOURCE ----------

      FREQUENCY : always


            sveerabhadra Shashidhara Veerabhadraiah (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: