How to “correctly” detect DPI of display with Java?

故事扮演 提交于 2019-11-27 08:55:21

Driver problem.

The real DPI is known only to driver, which reports it to the OS, which reports it to Java and other applications. Since not only Java has the wrong scale, it must be the driver.

This is ages old problem. Many graphical applications have a global setting "screen DPI" where users can adjust for their actual monitor.

Besides, since you're writing in Java, keep in mind that some OSes have no means of telling Java the real DPI (because they don't know themselves). The need for DPI configuration setting is thus even more clear.

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