KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > sun > bridge > CertificatePanel


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.j2ee.sun.bridge;
21
22 import java.util.ResourceBundle JavaDoc;
23
24 import org.openide.util.NbBundle;
25
26 /**
27  * This class displays the certificate
28  *
29  * @author Ludo
30  */

31
32 final class CertificatePanel extends javax.swing.JPanel JavaDoc {
33
34     /** Creates new form CertificatePanel */
35     public CertificatePanel(String JavaDoc certificate) {
36         initComponents();
37         initAccessibility();
38         try {
39             jEditorPane1.setText(certificate);
40         } catch (Exception JavaDoc exc) {
41             //Problem with locating file
42
System.err.println("Exception: " + exc.getMessage()); //NOI18N
43
exc.printStackTrace();
44         }
45     }
46     
47     private void initAccessibility() {
48         this.getAccessibleContext().setAccessibleName
49         (bundle.getString("ACSN_CertificatePanel"));
50         this.getAccessibleContext().setAccessibleDescription
51         (bundle.getString("ACSD_CertificatePanel"));
52         
53         jEditorPane1.getAccessibleContext().setAccessibleName
54         (bundle.getString("ACSN_EditorPane"));
55         jEditorPane1.getAccessibleContext().setAccessibleDescription
56         (bundle.getString("ACSD_EditorPane"));
57     }
58     
59     /** This method is called from within the constructor to
60      * initialize the form.
61      * WARNING: Do NOT modify this code. The content of this method is
62      * always regenerated by the Form Editor.
63      */

64     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
65
private void initComponents() {
66         jScrollPane1 = new javax.swing.JScrollPane JavaDoc();
67         jEditorPane1 = new javax.swing.JEditorPane JavaDoc();
68
69         setLayout(new javax.swing.BoxLayout JavaDoc(this, javax.swing.BoxLayout.Y_AXIS));
70
71         setBorder(javax.swing.BorderFactory.createEmptyBorder(12, 12, 0, 11));
72         jEditorPane1.setEditable(false);
73         jEditorPane1.setPreferredSize(new java.awt.Dimension JavaDoc(500, 500));
74         jScrollPane1.setViewportView(jEditorPane1);
75
76         add(jScrollPane1);
77
78     }
79     // </editor-fold>//GEN-END:initComponents
80

81     
82     // Variables declaration - do not modify//GEN-BEGIN:variables
83
private javax.swing.JEditorPane JavaDoc jEditorPane1;
84     private javax.swing.JScrollPane JavaDoc jScrollPane1;
85     // End of variables declaration//GEN-END:variables
86

87     private static final ResourceBundle JavaDoc bundle = NbBundle.getBundle(CertificatePanel.class);
88 }
89
Popular Tags