public void initMonitors(int width, int height) {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] devices = ge.getScreenDevices();
if (devices.length > 0) {
for (int i = 0; i < devices.length; i++) {
GraphicsDevice device = devices[i];
Rectangle gcBounds = device.getDefaultConfiguration().getBounds();
int x = gcBounds.x;
int y = gcBounds.y;
int w = gcBounds.width;
int h = gcBounds.height;
Monitor monitor = new Monitor(x, y, w, h, device);
monitors.add(monitor);
}
} else {
monitors.add(new Monitor(0, 0, width, height, devices[0]));
}
}