public class TestFrame extends JFrame {
JPanel contentPane;
JButton jbt = new JButton();
JScrollPane jScrollPane1 = new JScrollPane();
JTextArea jta = new JTextArea();
//Construct the frame
public TestFrame() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
}
}