Simple Swing Frame with closing functionality

import javax.swing.*;

public class SwingWindowEvent extends JFrame
{

public SwingWindowEvent() {

setSize(400,500);
setVisible(true);


setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

}

public static void main(String args[]) {

new SwingWindowEvent();
}

}

Comments

Popular posts from this blog

Custom Exception example for BankAccount

HashMap HashSet example

Annotation