Search code examples
java2dfullscreen

Why isn't Java Fullscreen Exclusive Mode running my max screen resolution?


I am trying to get the Java Fullscreen Exclusive Mode to run at 1080p on my computer, but it only has a size of 1536 x 864. The display mode is also set at 1920 x 1080.

GraphicsDevice device = GraphicsEnvironment
         .getLocalGraphicsEnvironment().getDefaultScreenDevice();
// device.getDisplayMode() returns 1920 x 1080 and some other stats
// device.getDefaultConfiguration().getBounds() returns 1536 x 864

I'm hoping to try to get the screen to be at 1920 x 1080 rather than 1536 x 864. Is there an actual way to do this or is this normal?

Thanks in advance!

Edit: For now, I'm getting this to work on Windows


Solution

  • It's been a little bit of time and I realized that I didn't answer the question. I eventually figured it out and the issue was likely a bug in Java 11. When I reverted back to the Java 8 development environment (v221?), the pixels went back to 1920 x 1080.