How to set the DPI of Java Swing apps on Windows/Linux?

前端 未结 6 782
鱼传尺愫
鱼传尺愫 2020-11-29 21:14

If you have an monitor with a DPI over 150 (such as Macbook Pro), you may also find the problem: the font on the Java Swing app is too small for high DPI monitor

6条回答
  •  隐瞒了意图╮
    2020-11-29 21:54

    This answer solved the issue on my 4K-screen Ubuntu laptop.

    In the application's config file, I added the -Dsun.java2d.uiScale=2.5 Java parameter and now, upon executing, the application is scaled well and is usable.

提交回复
热议问题