java swing set frame to full screen code example
Example 1: java fullscreen jframe
frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
Example 2: jframe full screen
frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
frame.setUndecorated(true);
frame.setVisible(true);