Java JFrame Show showOnScreen(int screen, JFrame frame)

Here you can find the source of showOnScreen(int screen, JFrame frame)

Description

show On Screen

License

Open Source License

Declaration

public static void showOnScreen(int screen, JFrame frame) 

Method Source Code

//package com.java2s;

import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;

import javax.swing.JFrame;

public class Main {
    public static void showOnScreen(int screen, JFrame frame) {
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        GraphicsDevice[] gs = ge.getScreenDevices();
        if (screen >= 0 && screen < gs.length) {
            //gs[screen].setFullScreenWindow(frame);
        } else if (gs.length > 0) {
            //            gs[0].setFullScreenWindow(frame);
        } else {/*from  w ww.ja va 2s.c o  m*/
            throw new RuntimeException("No Screens Found");
        }
    }
}

Related

  1. showDemoFrame(JFrame frame)
  2. showFrame(JFrame frame)
  3. showFrame(JFrame frame, JFrame parent)
  4. showHelp(JFrame frame, String path)
  5. showModalFrame(final JFrame newFrame, final JFrame owner)
  6. showSaveDialog(JFrame parent, String message)
  7. showSuccess(JFrame frame)
  8. showTextboxDialog(javax.swing.JFrame frame, String texto, String title, String valorInicial, int type)