Reputation: 2881
How to detect and change display resolution permanently using java?
Upvotes: 1
Views: 1487
Reputation: 56665
Getting the resolution is easy:
// Get the default toolkit
Toolkit toolkit = Toolkit.getDefaultToolkit();
// Get the current screen size
Dimension scrnsize = toolkit.getScreenSize();
I don't know if it's even possible to change it from Java though, at least without using JNI.
Upvotes: 2