my Java application is able to use fullscreen mode with mac thanks to this code:
Class util = Class.forName("com.apple.eawt.FullScreenUtilities");
Class params[] = new Class[]{Window.class, Boolean.TYPE};
Method method = util.getMethod("setWindowCanFullScreen", params);
method.invoke(util, myJFrame, true);
But this only enables fullscreen button at the right upper corner. Is it possible to go to fullscreen mode out of the application, as example by JButton-click?
It's only relevant for Mac OS X.
Thanks!
If you're using OS X (10.7 and higher), you can use the native fullscreen mode. Use this method to request the window go on full screen mod :
Where
window
is yourJFrame
for example.EDIT : You can also see the example given by @trashgod in his comment.
Hope this could help.