There are 2 monitors attached to my computer and I want to count them programmatically. How to do that with Java?
How to get numbers of monitors
docs.oracle.com/javase/7/docs/api/java/awt/… –
Aminoplast
Try next:
GraphicsEnvironment localGraphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
System.out.println(localGraphicsEnvironment.getScreenDevices().length);
© 2022 - 2024 — McMap. All rights reserved.