package chapter27;

import javax.swing.*;

public class MyFrame {
    public static void main(String[] args) {
        JFrame frame = new JFrame("MyFrame"); // Create a frame
        frame.setSize(400, 300); // Set the frame size
        frame.setLocationRelativeTo(null); // centers the frame on the screen
        // to terminate program when the frame is closed
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true); // Display the frame
    }
} 