is there a jframe function that makes it that the frame must always be fullscreen code example

Example 1: full screen in jframe

// Getting fullscreen **effect** by extending the frame either direction.
frame.setExtendedState(JFrame.MAXIMIZED_BOTH); 
frame.setUndecorated(true);

Example 2: set jframe fullscreen

GraphicsEnvironment graphics = 
		GraphicsEnvironment.getLocalGraphicsEnvironment();
        
GraphicsDevice device = graphics.getDefaultScreenDevice();
JFrame frame = new JFrame("Fullscreen");
device.setFullScreenWindow(frame);

Tags:

Java Example