Java JFrame fullScreen(JFrame window)

Here you can find the source of fullScreen(JFrame window)

Description

full Screen

License

Open Source License

Declaration

public static void fullScreen(JFrame window) 

Method Source Code


//package com.java2s;

import java.awt.Dimension;

import java.awt.Toolkit;
import javax.swing.JFrame;

public class Main {
    public static void fullScreen(JFrame window) {
        Toolkit kit = Toolkit.getDefaultToolkit();
        Dimension screenSize = kit.getScreenSize();
        screenSize.width = screenSize.width * 2 / 3;
        screenSize.height = screenSize.height * 2 / 3;
        window.setMinimumSize(screenSize);
        window.setLocation(screenSize.width * 1 / 6, screenSize.height * 1 / 6);
        window.setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);
    }//ww w  .j a  va 2  s. c o  m
}

Related

  1. findFileOpen(JFrame frame, String ext, String desc)
  2. findFileSave(JFrame frame, String ext, String desc)
  3. findJFrame(Component c)
  4. findJFrame(Component myComponent)
  5. fitToDesktop(final JFrame frame)
  6. fullScreenUsingMaximise(JFrame w)
  7. fullScreenWithAPI(JFrame w)
  8. getFileSelection(JFrame parent, boolean onlyDirectories, String startingDir)
  9. getJFrame(Component cmp)