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

java no longer high-DPI-aware on windows

XMLWordPrintable

    • 2d
    • generic
    • windows

      FULL PRODUCT VERSION :
      java version "9"
      Java(TM) SE Runtime Environment (build 9+181)
      Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      display scaling more than 100%

      A DESCRIPTION OF THE PROBLEM :
      Java 9 appears to no longer be high-dpi-aware on Windows.


      REGRESSION. Last worked in version 8u152

      ADDITIONAL REGRESSION INFORMATION:
      Was working in some 9 early access releases, but I don't remember the last one I used.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run on Windows 7 with display scaling (I'm using 170% scaling).

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Expect same approximate file chooser window and text size as for Java 8, and for icons to be rendered consistently.
      ACTUAL -
      File chooser and font size are scaled up under Java 9, and icons are rendered inconsistently due to OS image-like scaling.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.*;
      import java.io.File;

      public class DpiAwareBug {
         public static void main(String args[]) {
            SwingUtilities.invokeLater(
               new Runnable() {
                  public void run() {
                     JFileChooser fc = new JFileChooser();
                     fc.showOpenDialog(null);
                  }
               });
         }
      }

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

            prr Philip Race
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: