1 19 20 package org.netbeans.modules.websvc.wsitconf.ui; 21 22 26 public class ErrorJPanel extends javax.swing.JPanel { 27 28 31 public ErrorJPanel(String text) { 32 initComponents(); 33 jTextArea1.setText(text); 34 } 35 36 41 private void initComponents() { 43 44 jScrollPane1 = new javax.swing.JScrollPane (); 45 jTextArea1 = new javax.swing.JTextArea (); 46 jLabel1 = new javax.swing.JLabel (); 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 (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 } 89 90 private javax.swing.JLabel jLabel1; 92 private javax.swing.JScrollPane jScrollPane1; 93 private javax.swing.JTextArea jTextArea1; 94 96 } 97 | Popular Tags |