I have build a game in Java in full screen mode, I use this code to go full screen:
this.setPreferredSize(new Dimension((int)screenSize.getWidth(), (int)screenSize.getHeight()));
GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
if(gd.isFullScreenSupported()) {
this.setUndecorated(true);
gd.setFullScreenWindow(this);
}
else {
System.err.println("Full screen not supported!!");
}
On some windows systems when I press the ESCAPE key the program will exit fullscreen mode and minimize. How do I block this "function"?