Here you can find the source of exitFullScreen(JFrame mainAppFrame)
Parameter | Description |
---|---|
mainAppFrame | a parameter |
public static void exitFullScreen(JFrame mainAppFrame)
//package com.java2s; /**//from w w w .j a v a 2s .c o m * <p> * This class contains useful methods for positioning, sizing, and manipulating JFrames and other * Window-like elements. * </p> * <p> * <span class="BSDLicense"> This software is distributed under the <a * href="http://hci.stanford.edu/research/copyright.txt">BSD License</a>. </span> * </p> * * @author <a href="http://graphics.stanford.edu/~ronyeh">Ron B Yeh</a> (ronyeh(AT)cs.stanford.edu) */ import java.awt.*; import javax.swing.JFrame; public class Main { private static Point fsFrameLocation; private static boolean fsFrameResizable; private static Dimension fsFrameSize; private static boolean fsFrameUndecorated; /** * @param mainAppFrame */ public static void exitFullScreen(JFrame mainAppFrame) { mainAppFrame.dispose(); mainAppFrame.setUndecorated(fsFrameUndecorated); mainAppFrame.setResizable(fsFrameResizable); mainAppFrame.setSize(fsFrameSize); mainAppFrame.setLocation(fsFrameLocation); GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setFullScreenWindow(null); mainAppFrame.setVisible(true); } }