Swing High DPI Properties

When Java AWT/Swing got JavaFX-style automatic high DPI scaling in Java SE 9, there were also several new system properties to control that scaling. Unfortunately, as with the various glass.win.* properties of JavaFX (see e.g. here) they are not officially documented. You need to check the developer mailing list and the JDK test sources to … Continue reading “Swing High DPI Properties”

Minimum Size Scaling for Swing Windows

Since Java SE 9, Java AWT/Swing has supported automatic high DPI scaling on Windows and Linux, just like JavaFX. Ironically, this came with a bug that JavaFX used to have until Java 9: Window.setMinimumSize fails to scale the specified width and height on high DPI systems. (Unlike JavaFX, AWT/Swing windows ignore setMaximumSize anyway. Non-window components … Continue reading “Minimum Size Scaling for Swing Windows”

DPI Scaling for CSSBox

Radek Burget’s CSSBox is an (X)HTML/CSS rendering engine written in pure Java with AWT/Swing display output. While it doesn’t support JavaScript, it does support modern HTML/CSS and is also tolerant of any content it doesn’t understand. This makes CSSBox a good replacement for the standard JEditorPane which is limited to HTML 3.2 with some extensions, … Continue reading “DPI Scaling for CSSBox”

Windows GUI DPI Scaling in 2018

I have updated the article DPI Scaling in Windows GUIs with a modified test suite and new sets of screenshots for Windows 10 Creators Update, Microsoft .NET Framework 4.7.1, and Oracle Java SE 9.0.4. The focus of this update was of course Java 9 as JavaFX ceased special-casing 120 DPI, and AWT/Swing even got full … Continue reading “Windows GUI DPI Scaling in 2018”

JavaFX DPI Scaling in Java 9

While porting my projects to Java SE 9 I noticed that the JavaFX team has slipped in some small but important changes concerning DPI scaling that appear to be only documented in the Java bug database, specifically JDK Bug 8091832. The entry for 2016-03-31 notes that the startup flag -Dglass.win.minHiDPI, defining the minimum display DPI … Continue reading “JavaFX DPI Scaling in Java 9”

DPI Settings in Windows 10 “Creators Update”

Windows 10 started its journey to simplified display settings with an awkward combination of dialogs in the modern Settings app and the legacy Control Panel, as described in my previous post on the subject. With the recently released “Creators Update” (version 1703) the journey appears to have reached its destination. All display settings, including all … Continue reading “DPI Settings in Windows 10 “Creators Update””

JavaFX Snapshot Scaling

If you try taking image snapshots of a JavaFX Node on a high-DPI system, you’ll find that the result is strangely blurry. This is an unfortunate side effect of the JavaFX DPI scaling introduced in Java SE 8u60. At resolutions greater than 120 DPI, JavaFX automatically treats all coordinates as abstract “layout pixels” with a … Continue reading “JavaFX Snapshot Scaling”

Updates for VS2015 & .NET 4.6

With Visual Studio 2015, Microsoft finally provides a free Community edition that’s both reasonably feature-complete and legal to use for any purpose by individuals and teams of up to five, or of any size for non-commercial projects. That’s a huge step up from the shamefully crippled Express editions of previous versions, although those strangely continue … Continue reading “Updates for VS2015 & .NET 4.6”

DPI Settings in Windows 10

Important Update — Windows 10 “Creators Update” (version 1703, released in April 2017) brought a greatly simplified interface for high DPI settings and additional per-application compatibility options. Both are described in a new post, DPI Settings in Windows 10 “Creators Update”, which obsoletes the post below for “Creators Update” and newer. Windows 10 has once … Continue reading “DPI Settings in Windows 10”

JavaFX GUI Scaling at 120-144 DPI

I just updated my comparison of DPI Scaling in Windows GUIs for the recently released Java SE 8 Update 60 which brought automatic coordinate scaling for JavaFX on Windows at high DPI settings. I had previously only checked that the 200% (192 DPI) setting I’m using on my Dell XPS 15 works correctly. Now I … Continue reading “JavaFX GUI Scaling at 120-144 DPI”