1 2 package org.netbeans.modules.form.layoutdesign; 3 4 public class ALT_ParallelPosition01 extends javax.swing.JFrame { 5 6 7 public ALT_ParallelPosition01() { 8 initComponents(); 9 } 10 11 16 private void initComponents() { 18 jLabel1 = new javax.swing.JLabel (); 19 jTextField1 = new javax.swing.JTextField (); 20 jLabel2 = new javax.swing.JLabel (); 21 jTextField2 = new javax.swing.JTextField (); 22 23 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 24 jLabel1.setText("jLabel1"); 25 26 jTextField1.setText("jTextField1"); 27 28 jLabel2.setText("jLabel2"); 29 30 jTextField2.setText("jTextField2"); 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.LEADING, false) 39 .add(jLabel1) 40 .add(jLabel2) 41 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 42 .add(10, 10, 10) 43 .add(jTextField1, 0, 101, Short.MAX_VALUE)) 44 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 45 .add(10, 10, 10) 46 .add(jTextField2))) 47 .addContainerGap(279, Short.MAX_VALUE)) 48 ); 49 layout.setVerticalGroup( 50 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 51 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 52 .addContainerGap() 53 .add(jLabel1) 54 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 55 .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 56 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 57 .add(jLabel2) 58 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 59 .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 60 .addContainerGap(203, Short.MAX_VALUE)) 61 ); 62 pack(); 63 } 65 68 public static void main(String args[]) { 69 java.awt.EventQueue.invokeLater(new Runnable () { 70 public void run() { 71 new ALT_ParallelPosition01().setVisible(true); 72 } 73 }); 74 } 75 76 private javax.swing.JLabel jLabel1; 78 private javax.swing.JLabel jLabel2; 79 private javax.swing.JTextField jTextField1; 80 private javax.swing.JTextField jTextField2; 81 83 } 84 | Popular Tags |