Java GUI Scaling problems

前提是你 提交于 2021-02-05 09:48:29

问题


How i can disable scaling (Windows 10) for java program or process this in code to fix blur on my custom components?

I had tried Dsun.java2d.uiScale.enabled=false but it didn’t help.

enter image description here

is there any solution to this problem?


回答1:


Depending on the Java version you are using, you may want to consider different solutions, especially if you'd like to solve it on your application's side.

In any case, and if your concern is just to disable the Windows 10 scaling, you can do so by changing your Java settings and specifying Windows compatibility settings to override DPI scaling, as Elderry mentions here: https://superuser.com/a/1207925 , and as I'm quoting:

  1. Find java.exe you installed.
  2. Right click -> Properties
  3. Go to Compatibility tab
  4. Check Override high DPI scaling behavior.
  5. Choose System for Scaling performed by:

You can refer to this link for additional answers which may resolve your problem: https://superuser.com/questions/988379/how-do-i-run-java-apps-upscaled-on-a-high-dpi-display



来源:https://stackoverflow.com/questions/60838951/java-gui-scaling-problems

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!