Setting the Bounds for a Maximized Frame
import java.awt.Frame; import java.awt.Rectangle; public class Main { public static void main() { Frame frame = new Frame(); Rectangle bounds = new Rectangle(20, 20, 200, 200); frame.setMaximizedBounds(bounds); frame.setVisible(true); } }