import java.util.*; import java.awt.*; import javax.swing.*; class FullScreenAndNonResizableDemo extends JComponentWithEvents { public JFrame getFrame() { Container c = getParent(); while ((c != null) && !(c instanceof JFrame)) c = c.getParent(); return (JFrame)c; } public void makeFrameNonResizable() { JFrame f = getFrame(); if (f != null) f.setResizable(false); } public void setFullScreen() { JFrame f = getFrame(); if (f != null) GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setFullScreenWindow(f); } public void start() { makeFrameNonResizable(); setFullScreen(); } public static void main(String[] args) { launch(400,400); } }