1 2 package org.netbeans.modules.form.layoutdesign; 3 4 public class ALT_ParallelPosition03 extends javax.swing.JFrame { 5 6 7 public ALT_ParallelPosition03() { 8 initComponents(); 9 } 10 11 16 private void initComponents() { 18 jToggleButton1 = new javax.swing.JToggleButton (); 19 jScrollPane1 = new javax.swing.JScrollPane (); 20 jTextArea1 = new javax.swing.JTextArea (); 21 jButton1 = new javax.swing.JButton (); 22 23 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 24 jToggleButton1.setText("jToggleButton1"); 25 26 jTextArea1.setColumns(20); 27 jTextArea1.setRows(5); 28 jScrollPane1.setViewportView(jTextArea1); 29 30 jButton1.setText("jButton1"); 31 32 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); 33 getContentPane().setLayout(layout); 34 layout.setHorizontalGroup( 35 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 36 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 37 .addContainerGap() 38 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) 39 .add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 40 .add(jToggleButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 41 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 42 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 43 .addContainerGap(175, Short.MAX_VALUE)) 44 ); 45 layout.setVerticalGroup( 46 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 47 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 48 .addContainerGap() 49 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 50 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 51 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 52 .add(jToggleButton1) 53 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 54 .add(jButton1))) 55 .addContainerGap(225, Short.MAX_VALUE)) 56 ); 57 pack(); 58 } 60 63 public static void main(String args[]) { 64 java.awt.EventQueue.invokeLater(new Runnable () { 65 public void run() { 66 new ALT_ParallelPosition03().setVisible(true); 67 } 68 }); 69 } 70 71 private javax.swing.JButton jButton1; 73 private javax.swing.JScrollPane jScrollPane1; 74 private javax.swing.JTextArea jTextArea1; 75 private javax.swing.JToggleButton jToggleButton1; 76 78 } 79 | Popular Tags |