If the screens form one large virtual screen, one can have GraphicsConfigurations with following bounds:
- Rectangle[x=-1280,y=74,width=1280,height=1024]
- Rectangle[x=0,y=0,width=1920,height=1080]
- Rectangle[x=1920,y=0,width=1920,height=1080]
These were 3 monitors side-by-side. So:
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gds = ge.getScreenDevices();
for (GraphicsDevice gd : gds) {
int x = gd.getDefaultConfiguration().getBounds().x;
int y = gd.getDefaultConfiguration().getBounds().y;
JFrame frame = new NewJFrame();
frame.setLocation(x, y);
frame.setVisible(true);
}