Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is There A Way To Disable Mac OS Retina Scaling For A Swing App?

We have a rather complex application that needs as much screen real-estate as it can get, naturally the retina display Mac Books are excellent for this purpose.

However, it seems that in Swing those devices use points rather than pixels. They allow me to change the icons to higher resolution versions as discussed here. But since we do a lot of complex graphics and components overlays I want to just use "real pixels". To be clear I am not interested in fixing blurry images or icons (not practical in my case) just to disable the pixel doubling.

There is this interesting (albeit hacky) option I found thru this question.

like image 290
Shai Almog Avatar asked Nov 01 '22 17:11

Shai Almog


1 Answers

To my knowledge this is not possible as of JDK 1.8. The only workaround is to detect retina and use the scale affine transform when drawing. However, detecting retina seems to be a problem since the only option that seems to be available isn't on a per monitor case which is probably not a good solution: How can I detect whether a Mac has a Retina display from Java?

like image 167
Chen Avatar answered Nov 15 '22 05:11

Chen