1 19 package org.netbeans.modules.subversion.options; 20 21 25 public class LabelsPanel extends javax.swing.JPanel { 26 27 28 public LabelsPanel() { 29 initComponents(); 30 31 32 33 } 34 35 40 private void initComponents() { 42 43 jScrollPane1 = new javax.swing.JScrollPane (); 44 45 labelsList.setModel(new javax.swing.AbstractListModel () { 46 String [] strings = { "item1", "item2", "item3" }; 47 public int getSize() { return strings.length; } 48 public Object getElementAt(int i) { return strings[i]; } 49 }); 50 jScrollPane1.setViewportView(labelsList); 51 52 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); 53 this.setLayout(layout); 54 layout.setHorizontalGroup( 55 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 56 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 373, Short.MAX_VALUE) 57 ); 58 layout.setVerticalGroup( 59 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 60 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE) 61 ); 62 } 64 65 private javax.swing.JScrollPane jScrollPane1; 67 final javax.swing.JList labelsList = new javax.swing.JList (); 68 70 } 71 | Popular Tags |