KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > services > log > console > AboutLogView


1 /*
2  * AboutLogView.java
3  *
4  * Created on November 27, 2000, 8:15 PM
5  */

6
7 /*
8  * The contents of this file are subject to the Sapient Public License
9  * Version 1.0 (the "License"); you may not use this file except in compliance
10  * with the License. You may obtain a copy of the License at
11  * http://carbon.sf.net/License.html.
12  *
13  * Software distributed under the License is distributed on an "AS IS" basis,
14  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
15  * the specific language governing rights and limitations under the License.
16  *
17  * The Original Code is The Carbon Component Framework.
18  *
19  * The Initial Developer of the Original Code is Sapient Corporation
20  *
21  * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
22  */

23
24 package org.sape.carbon.services.log.console;
25
26 /**
27  *
28  * @author ghinkl
29  * @version
30  */

31 public class AboutLogView extends javax.swing.JDialog JavaDoc {
32
33     /** Creates new form AboutLogView */
34     public AboutLogView(java.awt.Frame JavaDoc parent,boolean modal) {
35         super (parent, modal);
36         initComponents ();
37         pack ();
38     }
39
40     /** This method is called from within the constructor to
41      * initialize the form.
42      * WARNING: Do NOT modify this code. The content of this method is
43      * always regenerated by the FormEditor.
44      */

45     private void initComponents() {//GEN-BEGIN:initComponents
46
java.awt.GridBagConstraints JavaDoc gridBagConstraints;
47
48         jLabel1 = new javax.swing.JLabel JavaDoc();
49         jLabel3 = new javax.swing.JLabel JavaDoc();
50         jLabel4 = new javax.swing.JLabel JavaDoc();
51         jButton2 = new javax.swing.JButton JavaDoc();
52
53         getContentPane().setLayout(new java.awt.GridBagLayout JavaDoc());
54
55         addWindowListener(new java.awt.event.WindowAdapter JavaDoc() {
56             public void windowClosing(java.awt.event.WindowEvent JavaDoc evt) {
57                 closeDialog(evt);
58             }
59         });
60
61         jLabel1.setFont(new java.awt.Font JavaDoc("Comic Sans MS", 0, 18));
62         jLabel1.setText("Enterprise Java Framework");
63         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
64         gridBagConstraints.gridx = 1;
65         gridBagConstraints.gridy = 0;
66         gridBagConstraints.gridwidth = 2;
67         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
68         gridBagConstraints.insets = new java.awt.Insets JavaDoc(40, 12, 0, 0);
69         getContentPane().add(jLabel1, gridBagConstraints);
70
71         jLabel3.setText("Carbon Log Console - Logging Service");
72         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
73         gridBagConstraints.gridx = 1;
74         gridBagConstraints.gridy = 1;
75         gridBagConstraints.gridwidth = 3;
76         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
77         gridBagConstraints.insets = new java.awt.Insets JavaDoc(4, 12, 0, 8);
78         getContentPane().add(jLabel3, gridBagConstraints);
79
80         jLabel4.setIcon(new javax.swing.JLabel JavaDoc() {
81             public javax.swing.Icon JavaDoc getIcon() {
82                 try {
83                     return new javax.swing.ImageIcon JavaDoc(
84                         new java.net.URL JavaDoc("http://java.sun.com/images/duke.gif")
85                     );
86                 } catch (java.net.MalformedURLException JavaDoc e) {
87                 }
88                 return null;
89             }
90         }.getIcon());
91         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
92         gridBagConstraints.gridx = 0;
93         gridBagConstraints.gridy = 0;
94         gridBagConstraints.gridheight = 3;
95         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
96         gridBagConstraints.insets = new java.awt.Insets JavaDoc(30, 20, 0, 0);
97         getContentPane().add(jLabel4, gridBagConstraints);
98
99         jButton2.setText("Ok");
100         jButton2.addActionListener(new java.awt.event.ActionListener JavaDoc() {
101             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
102                 jButton2ActionPerformed(evt);
103             }
104         });
105
106         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
107         gridBagConstraints.gridx = 1;
108         gridBagConstraints.gridy = 3;
109         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
110         gridBagConstraints.insets = new java.awt.Insets JavaDoc(39, 92, 0, 0);
111         getContentPane().add(jButton2, gridBagConstraints);
112
113     }//GEN-END:initComponents
114

115   private void jButton2ActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButton2ActionPerformed
116
// Add your handling code here:
117
this.closeDialog(null);
118   }//GEN-LAST:event_jButton2ActionPerformed
119

120     /** Closes the dialog */
121     private void closeDialog(java.awt.event.WindowEvent JavaDoc evt) {//GEN-FIRST:event_closeDialog
122
setVisible (false);
123         dispose ();
124     }//GEN-LAST:event_closeDialog
125

126     /**
127     * @param args the command line arguments
128     */

129     public static void main (String JavaDoc args[]) {
130         new AboutLogView (new javax.swing.JFrame JavaDoc (), true).show ();
131     }
132
133
134     // Variables declaration - do not modify//GEN-BEGIN:variables
135
private javax.swing.JButton JavaDoc jButton2;
136     private javax.swing.JLabel JavaDoc jLabel4;
137     private javax.swing.JLabel JavaDoc jLabel3;
138     private javax.swing.JLabel JavaDoc jLabel1;
139     // End of variables declaration//GEN-END:variables
140

141 }
142
Popular Tags