[quote]Yeah, I’m having trouble with that too, it seems like something strange happens when I swap between full screen and windowed mode. Here’s the source:
else if (e.getSource() == fullButton)
{
editor.dispose();
GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
if (device.getFullScreenWindow() == editor)
{
editor.setUndecorated(false);
device.setFullScreenWindow(null);
editor.setVisible(true);
editor.validate();
editor.repaint();
} else
{
editor.setUndecorated(true);
//editor.setVisible(true);
device.setFullScreenWindow(editor);
editor.validate();
}
}
[/quote]
I haven’t done much fullscreen stuff, but I don’t think you want to dispose the window that you’re going to be using in fullscreen mode.
If you do… it sounds like you’re going to want to call pack() or show() when you switch back out of fullscreen mode.
http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Window.html#dispose()
Also, in my experience, you can’t decorate or undecorate a frame after it’s been visible. That could have been a bug in the version of java I was using then, or maybe I was just doing it wrong.
I’m a newb, so I’m probably wrong about everything. Just trying to help
Edit: fixed link