Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何从 SWT 应用程序中检测它在 HiDPI(“视网膜”)显示器上运行?
类Device是 的超类Display,有一个方法调用,该方法getDPI()将返回显示器的 DPI 值:
Device
Display
getDPI()
Device device = shell.getDisplay(); System.out.println(device.getDPI());