private static boolean isRetina(){
  if (SystemInfo.isAppleJvm) {
    return hasAppleRetinaDevice();
  }
  if (SystemInfo.isMac) {
    GraphicsEnvironment e=GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice[] devices=e.getScreenDevices();
    for (    GraphicsDevice device : devices) {
      if (isOracleMacRetinaDevice(device)) {
        return true;
      }
    }
  }
  return false;
}

private static boolean isRetina ( ) { if ( SystemInfo . isAppleJvm ) { return hasAppleRetinaDevice ( ) ; } if ( SystemInfo . isMac ) { GraphicsEnvironment e = GraphicsEnvironment . getLocalGraphicsEnvironment ( ) ; GraphicsDevice [ ] devices = e . getScreenDevices ( ) ; for ( GraphicsDevice device : devices ) { if ( isOracleMacRetinaDevice ( device ) ) { return true ; } } } return false ; }
checks that at least one retina device is present . do not use this method if your are going to make decision for a particular screen . isretina ( graphics2d ) is more preferable
