Java AWT Toolkit get screen size
import java.awt.Dimension; import java.awt.Toolkit; public class Main{ public static void main(String[] args) { Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); System.out.println(d);/*from www .ja v a2s .c om*/ } }