I use the following code to check the number of screens and select the largest one to display my application. However, I still do not have time to detect cases when displays are mirrored instead of extended ones. Is there any way I can do this?
if (GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices().length > 1) {
findBiggestScreen(GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()).setFullScreenWindow(this);
} else {
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setFullScreenWindow(this);
}
anon
source
share