[platform] UI scaling of a platform application in 2025
Patrik Karlström <[email protected]> Thu, 2 Oct 2025 08:17:50 +0200
| Newsgroups | gmane.comp.java.ide.netbeans.user |
|---|---|
| Message-ID | <CAArD4mDxRTXanKxjii7V4siym4FAJEsGRqE4FjtQwk5g7HeADA@mail.gmail.com> |
Due to a (now fixed) WorldWind/JOGL bug regarding mouse coordinate translation I had to do a workaround with regard to UI scaling of a platform application. My solution was to have "-J-Dsun.java2d.uiScale=1 -J-Dprism.allowhidpi=false -J-Dflatlaf.uiScale=1" in the default_option and scale the UI by myself depending on the value of --fontsize. This was around 2018 or similar and has served me well, but now I read something about that --fontsize is about to get deprecated/discouraged. Any suggestions on what is best practice if I want a Swing+FlatLAF+JavaFX application respect the OS default UI scaling, but with the possibility to override? /Patrik