We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
seems to be provided with the Apple Java Extension Library.
See http://saipullabhotla.blogspot.de/2012/05/enabling-full-screen-mode-for-java.html for more details.
package com.myjavaworld.fullscreendemo; import java.awt.Window; import java.lang.reflect.Method; import javax.swing.JFrame; import javax.swing.WindowConstants; public class FullScreenDemo { public static void main(String[] args) { if (isMacOSX()) { System.setProperty( "com.apple.mrj.application.apple.menu.about.name", "Full Screen Demo"); } JFrame frame = new JFrame("Full Screen Demo"); frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); frame.setSize(600, 400); if (isMacOSX()) { enableFullScreenMode(frame); } frame.setVisible(true); } public static void enableFullScreenMode(Window window) { String className = "com.apple.eawt.FullScreenUtilities"; String methodName = "setWindowCanFullScreen"; try { Class<?> clazz = Class.forName(className); Method method = clazz.getMethod(methodName, new Class<?>[] { Window.class, boolean.class }); method.invoke(null, window, true); } catch (Throwable t) { System.err.println("Full screen mode is not supported"); t.printStackTrace(); } } private static boolean isMacOSX() { return System.getProperty("os.name").indexOf("Mac OS X") >= 0; } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
seems to be provided with the Apple Java Extension Library.
See http://saipullabhotla.blogspot.de/2012/05/enabling-full-screen-mode-for-java.html for more details.
The text was updated successfully, but these errors were encountered: