KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > wsitconf > ui > ErrorJPanel


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 2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.websvc.wsitconf.ui;
21
22 /**
23  *
24  * @author MartinG
25  */

26 public class ErrorJPanel extends javax.swing.JPanel JavaDoc {
27     
28     /**
29      * Creates new form ErrorJPanel
30      */

31     public ErrorJPanel(String JavaDoc text) {
32         initComponents();
33         jTextArea1.setText(text);
34     }
35     
36     /** This method is called from within the constructor to
37      * initialize the form.
38      * WARNING: Do NOT modify this code. The content of this method is
39      * always regenerated by the Form Editor.
40      */

41     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
42
private void initComponents() {
43
44         jScrollPane1 = new javax.swing.JScrollPane JavaDoc();
45         jTextArea1 = new javax.swing.JTextArea JavaDoc();
46         jLabel1 = new javax.swing.JLabel JavaDoc();
47
48         jScrollPane1.setBorder(null);
49         jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
50         jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
51         jScrollPane1.setHorizontalScrollBar(null);
52
53         jTextArea1.setEditable(false);
54         jTextArea1.setLineWrap(true);
55         jTextArea1.setText("This is a long text for testing purposes...This is a long text for testing purposes...This is a long text for testing purposes...This is a long text for testing purposes...");
56         jTextArea1.setWrapStyleWord(true);
57         jTextArea1.setAutoscrolls(false);
58         jTextArea1.setBorder(null);
59         jTextArea1.setOpaque(false);
60         jScrollPane1.setViewportView(jTextArea1);
61
62         jLabel1.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/org/netbeans/modules/websvc/wsitconf/resources/warning.gif")));
63         jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
64         jLabel1.setIconTextGap(0);
65
66         org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
67         this.setLayout(layout);
68         layout.setHorizontalGroup(
69             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
70             .add(layout.createSequentialGroup()
71                 .addContainerGap()
72                 .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 16, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
73                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
74                 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 354, Short.MAX_VALUE)
75                 .addContainerGap())
76         );
77         layout.setVerticalGroup(
78             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
79             .add(layout.createSequentialGroup()
80                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
81                     .add(layout.createSequentialGroup()
82                         .addContainerGap()
83                         .add(jLabel1))
84                     .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE))
85                 .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
86         );
87     }// </editor-fold>//GEN-END:initComponents
88

89     
90     // Variables declaration - do not modify//GEN-BEGIN:variables
91
private javax.swing.JLabel JavaDoc jLabel1;
92     private javax.swing.JScrollPane JavaDoc jScrollPane1;
93     private javax.swing.JTextArea JavaDoc jTextArea1;
94     // End of variables declaration//GEN-END:variables
95

96 }
97
Popular Tags