Skip to main content
gamedev.net
🔒 Locked

[java] Java full screen display modes

Started by IceBerg303 Apr 2, 2007 at 2:13 PM 3 replies 1.6k views
Original Post
IceBerg303
IceBerg303
I'm working on a project and Im using full screen mode with awt/swing. The problem is that in Linux and VISTA the display mode can not be set, it ALWAYS uses the current display mode instead. I of course assumed that it would only allow switching to modes available in my xorg.conf but I am unable to even use those. Even in VISTA this operation fails. I am even using the example from Dave Brackeen's book "Developing Games in Java" Ch 02 'FullScreenTest.java' Another thing I am wanting to do is adjust for widescreen displays as they are very common now. Instead of pixel streching, does anyone have any suggestions on how to cope with fullscreen wide displays when a game is designed for a 4:3 display? Incidentally this is all 2D, with 3D the widescreen would be easier to deal with.
OrangyTang
OrangyTang
Compatability and reliability with built-in fullscreen mode is pretty dire (especially on anything other than WinXP / 2000). Lack of good fullscreen support was one of the reasons I switched over to LWJGL (which does it's own fullscreen handling, and Just Works).
rasher_b2
rasher_b2
OrangyTang is correct. Java's fullscreen support is dire. It doesn't work under Linux and only on recent windows OS's (vista?). Anyway, if you really need fullscreen mode in these other operating systems then you'll need to use something like LWJGL.
IceBerg303
IceBerg303
Thanks guys. I think for now I will leave the game in a JFrame JPanel as it's a project for a cs independent study on game design using design patterns (state pattern, visitor pattern etc). Over the summer I plan to expand on the game at which point I will add in the full screen mode.

When I do decide I have time to implement full screen I will defiantly check out slick/LWJGL. For now I need to have the game fully working by the end of the semester and I still need to do my collisions via visitor pattern,

Again, thanks for the advice.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.