Swing full screen
6
Snippet for display one frame in full screen mode.
public static void main(String[] args) throws Exception {
System.out.println("Probando Full Screen...");
JFrame fr = new JFrame();
fr.setTitle("Test Title");
fr.getContentPane().add(new JLabel("Test content"));
fr.setResizable(false);
if (!fr.isDisplayable()){
fr.setUndecorated(true);
}
GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
gd.setFullScreenWindow(fr);
fr.setVisible(true);
Thread.sleep(5000);
System.exit(0);
}






There are currently no comments for this snippet.