automatically switch to fullscreen
This commit is contained in:
@@ -222,6 +222,16 @@ public class GamePanel extends JPanel implements Runnable {
|
||||
|
||||
tempScreen = new BufferedImage(screenWidth, screenHeight, BufferedImage.TYPE_INT_RGB);
|
||||
fg2 = (Graphics2D) tempScreen.getGraphics();
|
||||
|
||||
setFullscreen();
|
||||
}
|
||||
public void setFullscreen() {
|
||||
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
GraphicsDevice gd = ge.getDefaultScreenDevice();
|
||||
gd.setFullScreenWindow(Boot.window);
|
||||
|
||||
fScreenWidth = Boot.window.getWidth();
|
||||
fScreenHeight = Boot.window.getHeight();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user