Java tutorial
//package com.java2s; import java.awt.*; public class Main { /** * Obtain the primary desktop bounds. * * @return The primary desktop bounds <code>Rectangle</code>. */ public static Rectangle getPrimaryDesktopBounds() { return GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); } }