Java tutorial
//package com.java2s; //License from project: LGPL import java.awt.Dimension; import java.awt.Rectangle; import java.awt.Toolkit; public class Main { public static Rectangle getScreenSize() { Toolkit tk = Toolkit.getDefaultToolkit(); Dimension d = tk.getScreenSize(); return new Rectangle(0, 0, d.width, d.height); } }