Skip to main content

Java 3D applet in fullscreen mode?

2 replies [Last post]
skinhat
Offline
Joined: 2009-02-26

Ive got a Java 3D applet running in a browser and was wanting to allow users to make it fullscreen if they want to. I looked at graphicsDevice.setFullScreenWindow but this seems to only work for frames and not applets.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
blabloeblabloebla
Offline
Joined: 2010-04-10

You can do:

JFrame f = new JFrame();
f.add( applet );

and set the JFrame fullscreen.

skinhat
Offline
Joined: 2009-02-26

Thanks, that worked.

Is there a way to revert back to the applet ie switch away from the fullscreen frame? I tried

panel.graphicsDevice.setFullScreenWindow(null);

but the frame (f) remains visible and the applet remains black.

Also tried

f.remove(applet);

and didnt help.