File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changing Screen Resolution

 
Clarence J M Tauro
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic