I've found a Swing image rendering bug which afflicts only Macs with Retina displays (
The above line should return
2.0 on retina displays. On more recent non-retina macs it returns
1.0 and on all other platforms you get back
null. I can't find any official documentation, but I ran across it in this mailing list post while trying to solve a similar problem.