Java JFrame exitFullScreen(JFrame mainAppFrame)

Here you can find the source of exitFullScreen(JFrame mainAppFrame)

Description

exit Full Screen

License

BSD License

Parameter

Parameter Description
mainAppFrame a parameter

Declaration

public static void exitFullScreen(JFrame mainAppFrame) 

Method Source Code

//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);
    }
}

Related

  1. doDisableActiveRenderingInEDT(final JFrame jFrame)
  2. drawHelpPanel(String helpToDisplay, final JFrame frame)
  3. enable(final JFrame frame)
  4. enterFullScreenIfPossible(JFrame mainAppFrame)
  5. error(JFrame frame, String msg)
  6. fileChooser(JFrame frame, boolean saveDialog, String windowName, String filterName, String filterExtension)
  7. findFileOpen(JFrame frame, String ext, String desc)
  8. findFileSave(JFrame frame, String ext, String desc)
  9. findJFrame(Component c)