Here you can find the source of enableOSXFullscreen(Window window)
Parameter | Description |
---|---|
window | a parameter |
@SuppressWarnings({ "unchecked", "rawtypes" }) public static void enableOSXFullscreen(Window window)
//package com.java2s; //License from project: Apache License import java.awt.Window; import java.lang.reflect.Method; public class Main { /**//ww w. j a va2s . c o m * @param window */ @SuppressWarnings({ "unchecked", "rawtypes" }) public static void enableOSXFullscreen(Window window) { if (null == window) return; try { 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, window, true); } catch (ClassNotFoundException e1) { } catch (Exception e) { } } }