How can I (natively) implement the fullscreen feature of OSX Lion in a Java application?
The current answers given incorporate a good method for achieving a sort-of-fullscreen feature. I’ve read that Eclipse may be able to use the “native” fullscreen feature of Lion. That’s what I’m asking about.
I found this on Apple’s Java release notes:
Mac OS X 10.7 Lion Fullscreen Support
Java applications on Lion can now opt into the Fullscreen window feature per-window. Developers can use the com.apple.eawt.FullScreenUtilities class to mark windows as able to be full screened, and the com.apple.eawt.Application.requestToggleFullScreen(Window) method to programmatically request the window enter and exit full screen mode. This API does nothing on Mac OS X 10.6 Snow Leopard.
More explicitly, try calling this early on from the constructor of your
JFrames…