In my Java application I try to make a JFrame really fullscreen by using this code:
public class MainFrame extends JFrame { private static final long se
Use com.apple.eawt.FullScreenUtilities. And make sure to test that the system is running Mac OS.
public void enableFullscreen(Window window, boolean bool) { if (System.getProperty("os.name").startsWith("Mac OS")) { com.apple.eawt.FullScreenUtilities.setWindowCanFullScreen(window, bool); } }