List of utility methods to do Screen Number
int | getMonitorNumberAtLocation(Point pos) get Monitor Number At Location GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice screenDevices[] = ge.getScreenDevices(); for (int i = 0; i < screenDevices.length; i++) { final GraphicsDevice device1 = screenDevices[i]; GraphicsConfiguration gc = device1.getDefaultConfiguration(); Rectangle screenBounds = gc.getBounds(); if (screenBounds.contains(pos)) { return i; ... |
int | getNumberOfScreenDevices() Returns number of screens in current machine return GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices().length;
|
int | getNumberOfScreens() get Number Of Screens GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); try { GraphicsDevice[] gs = ge.getScreenDevices(); return gs.length; } catch (HeadlessException e) { return 0; |
int | getNumberOfScreens() Returns the number of screens. GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gd = ge.getScreenDevices();
return gd.length;
|