Bounds obtained from the graphics device configuration created from a BufferedImage are no longer real.
Starting from Java 9, they always return
(0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE), which are very huge bounds!
Rectangle bounds = new BufferedImage(800, 600, BufferedImage.TYPE_3BYTE_BGR) .createGraphics() .getDeviceConfiguration() .getBounds(); System.out.println(bounds);
The test shows how Java 8 has the expected behaviour while Java 9 surprises us.
(Last checked: 8u152 and 9.0.1; contributed by Vincent Privat)