Java tutorial
//package com.java2s; import java.awt.Dimension; import java.awt.Toolkit; import javax.swing.JFrame; public class Main { public static void setMaximized(JFrame frame) { Dimension screenSz = Toolkit.getDefaultToolkit().getScreenSize(); frame.setBounds(0, 0, screenSz.width, screenSz.height); } }