Source code: com/fetish/toolkit/AboutDialog.java
1 /*
2 * AboutDialog.java
3 *
4 * Created on July 23, 2001, 2:51 PM
5 */
6
7 package com.fetish.toolkit;
8
9 import java.awt.*;
10 import java.awt.image.*;
11
12 /**
13 * Dialog that shows some credits about the AdminToolFrontEnd
14 * @author bnt
15 */
16 public class AboutDialog extends javax.swing.JDialog {
17
18 /** Creates new form AboutDialog */
19 public AboutDialog(java.awt.Frame parent,boolean modal) {
20 super(parent, modal);
21 initComponents();
22 Point location = parent.getLocation();
23 location.x += 20;
24 location.y += 20;
25 this.setLocation( location );
26 this.jButton1.requestFocus();
27 }
28
29 /** This method is called from within the constructor to
30 * initialize the form.
31 * WARNING: Do NOT modify this code. The content of this method is
32 * always regenerated by the Form Editor.
33 */
34 private void initComponents() {//GEN-BEGIN:initComponents
35 jPanel1 = new javax.swing.JPanel();
36 jLabel1 = new javax.swing.JLabel();
37 jLabel2 = new javax.swing.JLabel();
38 jButton1 = new javax.swing.JButton();
39 getContentPane().setLayout(new java.awt.GridBagLayout());
40 java.awt.GridBagConstraints gridBagConstraints1;
41 setName("AboutDialog");
42 setModal(true);
43 addWindowListener(new java.awt.event.WindowAdapter() {
44 public void windowClosing(java.awt.event.WindowEvent evt) {
45 closeDialog(evt);
46 }
47 }
48 );
49
50 jPanel1.setLayout(new java.awt.GridBagLayout());
51 java.awt.GridBagConstraints gridBagConstraints2;
52
53 jLabel1.setText("FADA Administration Tool v1.0");
54 jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
55 gridBagConstraints2 = new java.awt.GridBagConstraints();
56 gridBagConstraints2.gridx = 0;
57 jPanel1.add(jLabel1, gridBagConstraints2);
58
59
60 jLabel2.setText("(c)2001 Sun MicroSystems");
61 jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
62 gridBagConstraints2 = new java.awt.GridBagConstraints();
63 gridBagConstraints2.gridx = 0;
64 gridBagConstraints2.gridy = 1;
65 gridBagConstraints2.fill = java.awt.GridBagConstraints.HORIZONTAL;
66 jPanel1.add(jLabel2, gridBagConstraints2);
67
68
69 jButton1.setText("OK");
70 jButton1.addActionListener(new java.awt.event.ActionListener() {
71 public void actionPerformed(java.awt.event.ActionEvent evt) {
72 jButton1ActionPerformed(evt);
73 }
74 }
75 );
76 gridBagConstraints2 = new java.awt.GridBagConstraints();
77 gridBagConstraints2.gridx = 0;
78 gridBagConstraints2.gridy = 2;
79 jPanel1.add(jButton1, gridBagConstraints2);
80
81
82 gridBagConstraints1 = new java.awt.GridBagConstraints();
83 gridBagConstraints1.gridx = 0;
84 gridBagConstraints1.gridy = 0;
85 gridBagConstraints1.fill = java.awt.GridBagConstraints.BOTH;
86 gridBagConstraints1.weightx = 1.0;
87 gridBagConstraints1.weighty = 1.0;
88 getContentPane().add(jPanel1, gridBagConstraints1);
89
90 pack();
91 }//GEN-END:initComponents
92
93 private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
94 // Add your handling code here:
95 setVisible(false);
96 dispose();
97 }//GEN-LAST:event_jButton1ActionPerformed
98
99 /** Closes the dialog */
100 private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
101 setVisible(false);
102 dispose();
103 }//GEN-LAST:event_closeDialog
104
105
106 // Variables declaration - do not modify//GEN-BEGIN:variables
107 private javax.swing.JPanel jPanel1;
108 private javax.swing.JLabel jLabel1;
109 private javax.swing.JLabel jLabel2;
110 private javax.swing.JButton jButton1;
111 // End of variables declaration//GEN-END:variables
112
113 }