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

Windows created with "System (Enhanced)" scaling are corrupted visually

    XMLWordPrintable

Details

    • x86_64
    • windows_10
    • Verified

    Description

      FULL PRODUCT VERSION :
      java version "1.8.0_121"
      Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
      Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows 10
      Version 1703 (OS Build 15063.138)

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      This only occurs on Windows 10 with the latest "Creator's Update" installed on a system with display scaling enabled (on a HiDPI display).

      A DESCRIPTION OF THE PROBLEM :
      The latest Windows 10 "Creator's Update" adds a scaling mode (Available under Properties>Configuration for any executable) called "System (Enhanced)" that automatically scales Windows GDI applications on HiDPI displays. It appears to be the default for executables, and carries on to any java application run by that executable. Any java window created under this scaling mode appears visually corrupted for all but the top-left of the visual area, and the window reports being the wrong resolution (For both Swing/AWT windows and LWJGL OpenGL windows).

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Eclipse is one application that defaults to this scaling mode, although there are surely others:
       - Install Eclipse.
       - Install latest Windows 10 Creator's Update.
       - Create a JFrame with any content in it.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      A working window.
      ACTUAL -
      Visual corruption.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      JFrame jFrame1 = new JFrame();
      JButton jButton1 = new JButton();
      jFrame1.add(jButton1);
      jFrame1.pack();
      jFrame1.show();
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Other scaling modes can be set for applications, but this may partially break some (Eclipse) and requires manual intervention on the user's end.

      Attachments

        Activity

          People

            pardesha Pardeep Sharma
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: