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(true); // XXX false); final new JFrame window; if (dec) JFrame.setDefaultLookAndFeelDecorated(true); registerEscape(window, r { window.dispose() }); window.add(wrap(c)); gd.setFullScreenWindow(window); ret window; }); }