SamSol
SamSol

Reputation: 2881

Detect and Change display resolution permanently using java

How to detect and change display resolution permanently using java?

Upvotes: 1

Views: 1487

Answers (1)

Bozhidar Batsov
Bozhidar Batsov

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

Related Questions