Making a full screen JFrame

Is it possible to make a JFrame full screen after it's been initialized, and then bring it back to windowed mode? I have this method to create a full screen JFrame, but it only works before the frame has been made visible:

publicvoid goFullScreen(){

GraphicsEnvironment env = GraphicsEnvironment.

getLocalGraphicsEnvironment();

device = env.getDefaultScreenDevice();

setUndecorated(true);

setResizable(false);

device.setFullScreenWindow(this);

}

[722 byte] By [mike200015a] at [2007-11-27 1:37:36]
# 1
Based on the documentation of GraphicsDevice, I would expect it to be possible, but I note that the setUndecorated method throws an Exception if the Frame is displayed. http://java.sun.com/javase/6/docs/api/java/awt/Frame.html#setUndecorated(boolean)
pthorsona at 2007-7-12 0:48:25 > top of Java-index,Desktop,Core GUI APIs...