1public Main() {
2
3 JFrame testingBlack = new JFrame("MCVe");
4
5 GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
6 GraphicsDevice[] gds = ge.getScreenDevices();
7 GraphicsConfiguration gc = gds[1].getDefaultConfiguration();
8 Rectangle rect = gc.getBounds();
9 testingBlack.setLocation(rect.getLocation());
10
11 // or, if you like this style better
12
13 testingBlack.setLocation(GraphicsEnvironment
14 .getLocalGraphicsEnvironment()
15 .getScreenDevices()[1]
16 .getDefaultConfiguration()
17 .getBounds()
18 .getLocation());
19
20 testingBlack.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
21 testingBlack.setVisible(true);
22}