1 /*
2 * CustomEditorDialog.java
3 *
4 * Created on 19 February 2001, 18:13
5 */
6
7 package org.johndavidtaylor.beans.beanpeeler;
8
9 /***
10 *
11 * @author JTAYLOR3
12 */
13 public class CustomEditorDialog extends java.awt.Dialog {
14
15 /*** Creates new form CustomEditorDialog */
16 public CustomEditorDialog(java.awt.Frame parent,boolean modal) {
17 super (parent, modal);
18 initComponents ();
19 pack ();
20 }
21
22 /*** This method is called from within the init() method 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 panel1 = new java.awt.Panel();
29 button1 = new java.awt.Button();
30
31 addWindowListener(new java.awt.event.WindowAdapter() {
32 public void windowClosing(java.awt.event.WindowEvent evt) {
33 closeDialog(evt);
34 }
35 });
36
37 button1.setLabel("OK");
38 button1.addActionListener(new java.awt.event.ActionListener() {
39 public void actionPerformed(java.awt.event.ActionEvent evt) {
40 button1ActionPerformed(evt);
41 }
42 });
43
44 panel1.add(button1);
45
46 add(panel1, java.awt.BorderLayout.SOUTH);
47
48 }//GEN-END:initComponents
49
50 private void button1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button1ActionPerformed
51 setVisible (false);
52 dispose ();
53 }//GEN-LAST:event_button1ActionPerformed
54
55 /*** Closes the dialog */
56 private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
57 setVisible (false);
58 dispose ();
59 }//GEN-LAST:event_closeDialog
60
61 /***
62 * @param args the command line arguments
63 */
64 public static void main (String args[]) {
65 new CustomEditorDialog (new java.awt.Frame (), true).show ();
66 }
67
68
69 // Variables declaration - do not modify//GEN-BEGIN:variables
70 private java.awt.Panel panel1;
71 private java.awt.Button button1;
72 // End of variables declaration//GEN-END:variables
73
74 }
This page was automatically generated by Maven