1 2 package org.netbeans.modules.form.layoutdesign; 3 4 public class ALT_ParallelPosition04 extends javax.swing.JFrame { 5 6 7 public ALT_ParallelPosition04() { 8 initComponents(); 9 } 10 11 16 private void initComponents() { 18 jButton1 = new javax.swing.JButton (); 19 jButton2 = new javax.swing.JButton (); 20 jButton3 = new javax.swing.JButton (); 21 22 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 23 jButton1.setText("A"); 24 25 jButton2.setText("BB"); 26 27 jButton3.setText("jButton3"); 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.TRAILING, false) 36 .add(jButton3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 37 .add(jButton2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 38 .add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 39 .addContainerGap(315, Short.MAX_VALUE)) 40 ); 41 layout.setVerticalGroup( 42 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 43 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 44 .addContainerGap() 45 .add(jButton1) 46 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 47 .add(jButton2) 48 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 49 .add(jButton3) 50 .addContainerGap(208, Short.MAX_VALUE)) 51 ); 52 pack(); 53 } 55 58 public static void main(String args[]) { 59 java.awt.EventQueue.invokeLater(new Runnable () { 60 public void run() { 61 new ALT_ParallelPosition04().setVisible(true); 62 } 63 }); 64 } 65 66 private javax.swing.JButton jButton1; 68 private javax.swing.JButton jButton2; 69 private javax.swing.JButton jButton3; 70 72 } 73 | Popular Tags |