Maximizing a JFrame

This is as close as you can get: just resize the window to the current screensize:

 
import javax.swing.*;
import java.awt.*;
   
public class Maximize extends JFrame {
 
   public Maximize() {
      Toolkit tk = getToolkit();
      
      setSize((int) getToolkit().getScreenSize().getWidth(), 
              (int) getToolkit().getScreenSize().getHeight());
   }
 
   public static void main(String args[]) {
      new Maximize().setVisible(true);     
   }
}