javaswingintellij-ideahidpi

Running Swing apps in IntelliJ Idea Community on a HiDPI screen


I run Arch Linux with I3 on an XPS13 with 3200x1800 res screen.

I'm currently working on some Swing apps. When I run my app from the commandline with the java -Dsun.java2d.uiScale=2 myApp, the app is scaled (else it's just too small).

I also have the same line in my vmoptions file, but for some reason IntelliJ Idea does not upscale my Swing app when I run it.

How can I get IntelliJ idea to scale my Swing app?


Solution

  • Specify the scaling option in the VM options field of the Run/Debug configuration. .vmoptions file is used for IntelliJ IDEA itself, not for your apps.