/** * @author lautturi.com * Java example: Maximize the jframe window */ import java.util.*; import javax.swing.JFrame; public class Lautturi { public static void main(String[] args) { JFrame frame = new JFrame(); frame.setTitle("My First GUI"); frame.setSize(500,300); frame.setLocationRelativeTo(null); // put jframe in center of screen frame.setExtendedState(java.awt.Frame.MAXIMIZED_BOTH); frame.setVisible(true); } }