FileDocCategorySizeDatePackage
FrameDemo.javaAPI DocExample589Tue Dec 12 18:59:20 GMT 2000None

FrameDemo.java

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class FrameDemo {
    public static void main(String s[]) {
        JFrame frame = new JFrame("FrameDemo");

        frame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });

        JLabel emptyLabel = new JLabel("");
        emptyLabel.setPreferredSize(new Dimension(175, 100));
        frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);

        frame.pack();
        frame.setVisible(true);
    }
}