KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > DataLoaderTests > DataObjectTest > data > Package > SwingFormObject


1 package DataLoaderTests.DataObjectTest.data.Package;/*
2  * SwingFormObject.java
3  *
4  * Created on December 20, 1999, 12:19 PM
5  */

6  
7
8
9 /**
10  *
11  * @author pknakal
12  * @version
13  */

14 public class SwingFormObject extends javax.swing.JFrame JavaDoc {
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 JavaDoc ();
29     jLabel1 = new javax.swing.JLabel JavaDoc ();
30     addWindowListener (new java.awt.event.WindowAdapter JavaDoc () {
31       public void windowClosing (java.awt.event.WindowEvent JavaDoc evt) {
32         exitForm (evt);
33       }
34     }
35     );
36
37     jButton1.setText ("Close");
38     jButton1.addMouseListener (new java.awt.event.MouseAdapter JavaDoc () {
39       public void mouseClicked (java.awt.event.MouseEvent JavaDoc evt) {
40         jButton1MouseClicked (evt);
41       }
42     }
43     );
44
45
46     getContentPane ().add (jButton1, java.awt.BorderLayout.SOUTH);
47
48     jLabel1.setText ("dataObjectsInPkg/SwingFormObject");
49     jLabel1.setHorizontalAlignment (javax.swing.SwingConstants.CENTER);
50
51
52     getContentPane ().add (jLabel1, java.awt.BorderLayout.CENTER);
53
54   }//GEN-END:initComponents
55

56 private void jButton1MouseClicked (java.awt.event.MouseEvent JavaDoc evt) {//GEN-FIRST:event_jButton1MouseClicked
57
this.dispose();
58     this.exitForm(null);
59   }//GEN-LAST:event_jButton1MouseClicked
60

61   /** Exit the Application */
62   private void exitForm(java.awt.event.WindowEvent JavaDoc evt) {//GEN-FIRST:event_exitForm
63
System.exit (0);
64   }//GEN-LAST:event_exitForm
65

66   /**
67   * @param args the command line arguments
68   */

69   public static void main (String JavaDoc args[]) {
70     new SwingFormObject ().show ();
71   }
72
73
74   // Variables declaration - do not modify//GEN-BEGIN:variables
75
private javax.swing.JButton JavaDoc jButton1;
76   private javax.swing.JLabel JavaDoc jLabel1;
77   // End of variables declaration//GEN-END:variables
78

79 }
Popular Tags