static JFrame showFullScreen(final JComponent c) { ret (JFrame) swingAndWait(func { GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment() .getDefaultScreenDevice(); if (!gd.isFullScreenSupported()) fail("No full-screen mode supported!"); bool dec = JFrame.isDefaultLookAndFeelDecorated(); if (dec) JFrame.setDefaultLookAndFeelDecorated(false); final new JFrame window; window.setUndecorated(true); if (dec) JFrame.setDefaultLookAndFeelDecorated(true); registerEscape(window, r { window.dispose() }); window.add(wrap(c)); gd.setFullScreenWindow(window); ret window; }); }