01: package DataLoaderTests.DataObjectTest.data;
02:
03: /*
04: * SwingFormObject.java
05: *
06: * Created on December 20, 1999, 12:19 PM
07: */
08:
09: /**
10: *
11: * @author pknakal
12: * @version
13: */
14: public class SwingFormObject extends javax.swing.JFrame {
15:
16: /** Creates new form SwingFormObject */
17: public SwingFormObject() {
18: initComponents();
19: pack();
20: }
21:
22: /** This method is called from within the constructor to
23: * initialize the form.
24: * WARNING: Do NOT modify this code. The content of this method is
25: * always regenerated by the FormEditor.
26: */
27: private void initComponents() {//GEN-BEGIN:initComponents
28: jButton1 = new javax.swing.JButton();
29: jLabel1 = new javax.swing.JLabel();
30: addWindowListener(new java.awt.event.WindowAdapter() {
31: public void windowClosing(java.awt.event.WindowEvent evt) {
32: exitForm(evt);
33: }
34: });
35:
36: jButton1.setText("Close");
37: jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
38: public void mouseClicked(java.awt.event.MouseEvent evt) {
39: jButton1MouseClicked(evt);
40: }
41: });
42:
43: getContentPane().add(jButton1, java.awt.BorderLayout.SOUTH);
44:
45: jLabel1.setText("SwingFormObject");
46: jLabel1
47: .setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
48:
49: getContentPane().add(jLabel1, java.awt.BorderLayout.CENTER);
50:
51: }//GEN-END:initComponents
52:
53: private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked
54: this .dispose();
55: this .exitForm(null);
56: }//GEN-LAST:event_jButton1MouseClicked
57:
58: /** Exit the Application */
59: private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
60: System.exit(0);
61: }//GEN-LAST:event_exitForm
62:
63: /**
64: * @param args the command line arguments
65: */
66: public static void main(String args[]) {
67: new SwingFormObject().show();
68: }
69:
70: // Variables declaration - do not modify//GEN-BEGIN:variables
71: private javax.swing.JButton jButton1;
72: private javax.swing.JLabel jLabel1;
73: // End of variables declaration//GEN-END:variables
74:
75: }
|