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