osx - How can I detect whether a Mac has a Retina display from Java? -



osx - How can I detect whether a Mac has a Retina display from Java? -

i've found swing image rendering bug afflicts macs retina displays (type_int_argb_pre bufferedimages fail draw). have effective workaround (use type_int_argb images instead), in order apply it, need able observe whether host machine mac retina display. detecting whether machine mac no problem, how can determine display type?

toolkit.getdefaulttoolkit().getdesktopproperty("apple.awt.contentscalefactor")

the above line should homecoming 2.0 on retina displays. on more recent non-retina macs returns 1.0 , on other platforms null. can't find official documentation, ran across in mailing list post while trying solve similar problem.

java osx

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -