KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > DataLoaderTests > DataObjectTest > data > AWTFormObject


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

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

14 public class AWTFormObject extends java.awt.Frame JavaDoc {
15
16   /** Creates new form AWTFormObject */
17     public AWTFormObject() {
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
button1 = new java.awt.Button JavaDoc ();
29     label1 = new java.awt.Label 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     button1.setLabel ("Close");
38     button1.addMouseListener (new java.awt.event.MouseAdapter JavaDoc () {
39       public void mouseClicked (java.awt.event.MouseEvent JavaDoc evt) {
40         button1MouseClicked (evt);
41       }
42     }
43     );
44
45
46     add (button1, java.awt.BorderLayout.SOUTH);
47
48     label1.setText ("dataObjectsInPkg/AWTFormObject");
49     label1.setAlignment (java.awt.Label.CENTER);
50
51
52     add (label1, java.awt.BorderLayout.CENTER);
53
54   }//GEN-END:initComponents
55

56 private void button1MouseClicked (java.awt.event.MouseEvent JavaDoc evt) {//GEN-FIRST:event_button1MouseClicked
57
this.dispose();
58     this.exitForm(null);
59   }//GEN-LAST:event_button1MouseClicked
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 AWTFormObject ().show ();
71   }
72
73
74   // Variables declaration - do not modify//GEN-BEGIN:variables
75
private java.awt.Button JavaDoc button1;
76   private java.awt.Label JavaDoc label1;
77   // End of variables declaration//GEN-END:variables
78

79 }
Popular Tags