File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Changing Screen Resolution Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Changing Screen Resolution" Watch "Changing Screen Resolution" New topic
Author

Changing Screen Resolution

Clarence J M Tauro
Ranch Hand

Joined: Aug 09, 2008
Posts: 30
Is there any way by which I can change the screen resolution in Java. I mean to say that I need to change the resolution of windows desktop to 640 x 480 to 800 x 600 on the click of a button. Is it possible?

Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

Well, there is full screen exclusive mode. This lets you change the screen resolution, but I think only for the actual Java application itself. I don't think it allows you to change the resolution persistently for other applications. In any case, that's where I'd start looking.


[Jess in Action][AskingGoodQuestions]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19538
    
  16

I think Ernest is right. That means that you'll have to use JNI to do this. The ChangeDisplaySettings and ChangeDisplaySettingsEx Windows system functions are probably what you need for Windows. No idea for Linux.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing Screen Resolution
 
Similar Threads
Changing screen resolution using java
GUI and screen resolution
Windows/Mac screen resolution change
How to change the resolution of screen using JavaScript
screen resolution problem