Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
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 at 170% A DESCRIPTION OF THE PROBLEM : Swing applications now look bad with a scaled display on Windows. The comments to 8187151 claim that this is not due to a problem with dpi awareness. See http://www.jgrasp.org/tmp/scale.png which shows a file chooser under Java 9 and Java 8 with 170% display scaling. The file chooser under Java 9 has odd white lines near the right sides of the buttons and scrollbar, differing appearance of identical icons (even if the images don't scale well, the icons should all look the same), badly scaled icon images (more image sizes need to be provided if that is what is happening, or they need to be drawn on-the-fly). The borders of the combo boxes do not look right. The triangle icon on one of the combo boxes and on the scroll bar are asymmetrical. All swing applications will look bad at this scaling level. REGRESSION. Last worked in version 8u152 STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Compile and run the code on a system with 170% display scaling. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Normal-looking file chooser dialog (though possibly larger than under Java 8). ACTUAL - Badly rendered file chooser dialog. 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 ----------
|