Java Graphics Environment getMaximumWindowDimension()

Here you can find the source of getMaximumWindowDimension()

Description

get Maximum Window Dimension

License

Open Source License

Declaration

public static Dimension getMaximumWindowDimension() 

Method Source Code

//package com.java2s;
/*/*from  w ww. j av a 2s  .  c om*/
 * Copyright (c) 2009 Albert Kurucz. 
 *
 * This file, Util.java is part of JTStand.
 *
 * JTStand is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * JTStand is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with GTStand.  If not, see <http://www.gnu.org/licenses/>.
 */

import java.awt.Dimension;
import java.awt.GraphicsEnvironment;
import java.awt.Rectangle;

public class Main {
    public static Dimension getMaximumWindowDimension() {
        GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
        Rectangle bounds = env.getMaximumWindowBounds();
        //System.out.println("bounds:" + bounds.width + " " + bounds.height);
        return new Dimension(bounds.width, bounds.height);
    }
}

Related

  1. getDefaultGraphicsConfig()
  2. getDesktopSize()
  3. getLocalGraphicsEnvironment()
  4. getMaximumWindowBounds()
  5. getMenuShortCutKeyMask()
  6. getWindowMaxBounds()
  7. isInteractive()