1 package DataLoaderTests.DataObjectTest.data.Package; 6 7 8 9 14 public class AWTFormObject extends java.awt.Frame { 15 16 17 public AWTFormObject() { 18 initComponents (); 19 pack (); 20 } 21 22 27 private void initComponents () { button1 = new java.awt.Button (); 29 label1 = new java.awt.Label (); 30 addWindowListener (new java.awt.event.WindowAdapter () { 31 public void windowClosing (java.awt.event.WindowEvent evt) { 32 exitForm (evt); 33 } 34 } 35 ); 36 37 button1.setLabel ("Close"); 38 button1.addMouseListener (new java.awt.event.MouseAdapter () { 39 public void mouseClicked (java.awt.event.MouseEvent 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 } 56 private void button1MouseClicked (java.awt.event.MouseEvent evt) { this.dispose(); 58 this.exitForm(null); 59 } 61 62 private void exitForm(java.awt.event.WindowEvent evt) { System.exit (0); 64 } 66 69 public static void main (String args[]) { 70 new AWTFormObject ().show (); 71 } 72 73 74 private java.awt.Button button1; 76 private java.awt.Label label1; 77 79 } | Popular Tags |