Here you can find the source of getDefaultMainFrameSize()
public static Dimension getDefaultMainFrameSize()
//package com.java2s; import java.awt.Dimension; import java.awt.Toolkit; public class Main { public static Dimension getDefaultMainFrameSize() { Dimension size = Toolkit.getDefaultToolkit().getScreenSize(); size.width = size.width * 8 / 10; size.height = size.height * 8 / 10; return size; }/* w ww. j a v a 2 s. c om*/ }