LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: CodeBunny on April 13, 2011, 12:32:01

Title: Applet to fullscreen and back again
Post by: CodeBunny on April 13, 2011, 12:32:01
So, on an applet, if I don't use Display.setParent() I can make the Display fullscreen, but I'm not using fullscreen mode I have to create an entirely new window, and that's unsightly. Display.setParent() means that I don't have the random floating window and the game is in my browser like a flash game, but I can't seem to use fullscreen.

Can I temporarily remove the Display from the canvas so I can make it fullscreen, and then revert it to its embedded behavior?
Title: Re: Applet to fullscreen and back again
Post by: kappa on April 13, 2011, 12:53:15
Quote from: CodeBunny on April 13, 2011, 12:32:01
Can I temporarily remove the Display from the canvas so I can make it fullscreen, and then revert it to its embedded behavior?

Yes.

Alternatively you can also switch straight to fullscreen without removing it from the canvas (just calling Display.setFullscreen(true), however you've got to make sure you don't set a Display.setDisplayMode() anywhere in your applet.