Here you can find the source of getWindowMaxBounds()
public static Rectangle getWindowMaxBounds()
//package com.java2s; //License from project: LGPL import java.awt.GraphicsEnvironment; import java.awt.Rectangle; public class Main { public static Rectangle getWindowMaxBounds() { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); return ge.getMaximumWindowBounds(); }/*from ww w . j a v a 2s. c om*/ }