1 2 package org.netbeans.modules.form.layoutdesign; 3 4 public class ALT_ParallelPosition21 extends javax.swing.JFrame { 5 6 7 public ALT_ParallelPosition21() { 8 initComponents(); 9 } 10 11 16 private void initComponents() { 18 jLabel1 = new javax.swing.JLabel (); 19 jScrollPane1 = new javax.swing.JScrollPane (); 20 jList1 = new javax.swing.JList (); 21 jScrollPane2 = new javax.swing.JScrollPane (); 22 jTextArea1 = new javax.swing.JTextArea (); 23 24 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 25 jLabel1.setText("jLabel1"); 26 27 jList1.setModel(new javax.swing.AbstractListModel () { 28 String [] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; 29 public int getSize() { return strings.length; } 30 public Object getElementAt(int i) { return strings[i]; } 31 }); 32 jScrollPane1.setViewportView(jList1); 33 34 jTextArea1.setColumns(20); 35 jTextArea1.setRows(5); 36 jScrollPane2.setViewportView(jTextArea1); 37 38 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); 39 getContentPane().setLayout(layout); 40 layout.setHorizontalGroup( 41 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 42 .add(layout.createSequentialGroup() 43 .addContainerGap() 44 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 45 .add(jLabel1) 46 .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 47 .add(43, 43, 43) 48 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 49 .addContainerGap(206, Short.MAX_VALUE)) 50 ); 51 layout.setVerticalGroup( 52 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 53 .add(layout.createSequentialGroup() 54 .addContainerGap() 55 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 56 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 57 .add(layout.createSequentialGroup() 58 .add(jLabel1) 59 .add(86, 86, 86) 60 .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) 61 .addContainerGap(125, Short.MAX_VALUE)) 62 ); 63 pack(); 64 } 66 69 public static void main(String args[]) { 70 java.awt.EventQueue.invokeLater(new Runnable () { 71 public void run() { 72 new ALT_ParallelPosition21().setVisible(true); 73 } 74 }); 75 } 76 77 private javax.swing.JLabel jLabel1; 79 private javax.swing.JList jList1; 80 private javax.swing.JScrollPane jScrollPane1; 81 private javax.swing.JScrollPane jScrollPane2; 82 private javax.swing.JTextArea jTextArea1; 83 85 } 86 | Popular Tags |