private static void setFullscreen(boolean fs) { if (fs != fullscreen) { GraphicsDevice device = guiFrame.getGraphicsConfiguration().getDevice(); // hide window guiFrame.setVisible(false); guiFrame.dispose(); // change options guiFrame.setUndecorated(fs); device.setFullScreenWindow(fs ? guiFrame : null); // display window guiFrame.setLocationRelativeTo(null); guiFrame.setVisible(true); instance.requestFocusInWindow(); fullscreen = fs; } Options.set(Options.FULLSCREEN, fullscreen); }
/** Assigns the current checkbox value to the option specified in the constructor. */ public void assign() { options.set(option, value); }