The Source for Java Technology Collaboration
Webmaster Alert: Posting to Jive Forums is currently not working. Estimated time for fix is unknown.

Home » java.net Forums » Java Desktop Technologies » Java 2D

Thread: Change resolution..Is a big problem.

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 1 - Last Post: Mar 31, 2006 1:51 PM by: Dmitri Trembove...
smalfatti

Posts: 11
Change resolution..Is a big problem.
Posted: Mar 31, 2006 1:43 PM
  Click to reply to this thread Reply

Hi all.

A long time that I am trying to change the screen resolution using java Code. But it don´t work.

I am looking for a way to force my screen change to 800 x 600 resolution.

I am developing a Game, and this part is very important. I found one possibility to do it in this forum:

http://forum.java.sun.com/thread.jspa?threadID=624649&messageID=3554316

But it don´t work at Windows XP.

If anybody already development some method like it, please report me.
..
MyJFrame.changeResolution(800,600);
..

Thank you all for atention.

Dmitri Trembove...
Re: [JAVA2D] Change resolution..Is a big problem.
Posted: Mar 31, 2006 1:51 PM   in response to: smalfatti
  Click to reply to this thread Reply

Hello,

you need to use the api suggested on that forum, namely:
GraphicsDevice.setFullScreenWindow()
GraphicsDevice.setDisplayMode(DisplayMode)

The reason the sample code in the forum might not work is that the
display mode that's created is probably not supported.

Instead use GraphicsDevice.getDisplayModes() to obtain a list of
supported display modes, and pick one of them.

Here's a tutorial:
http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html

Thanks,
Dmitri


On Fri, Mar 31, 2006 at 01:43:10PM -0800, java2d@javadesktop.org wrote:
> Hi all.
>
> A long time that I am trying to change the screen resolution using java Code. But it don??t work.
>
> I am looking for a way to force my screen change to 800 x 600 resolution.
>
> I am developing a Game, and this part is very important. I found one possibility to do it in this forum:
>
> http://forum.java.sun.com/thread.jspa?threadID=624649&messageID=3554316
>
> But it don??t work at Windows XP.
>
> If anybody already development some method like it, please report me.
> ..
> MyJFrame.changeResolution(800,600);
> ..
>
> Thank you all for atention.
> [Message sent by forum member 'smalfatti' (smalfatti)]
>
> http://forums.java.net/jive/thread.jspa?messageID=99502
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the body
> of the message "signoff JAVA2D-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".





 XML java.net RSS