1public static void showOnScreen( int screen, JFrame frame ) {
2 GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
3 GraphicsDevice[] gs = ge.getScreenDevices();
4
5 if(screen > -1 && screen < gs.length) {
6 gs[screen].setFullScreenWindow(frame);
7 }else if(gs.length > 0) {
8 gs[0].setFullScreenWindow(frame);
9 }else {
10 throw new RuntimeException("No Screens Found");
11 }
12}