1 2 package org.netbeans.modules.form.layoutdesign; 3 4 public class ALT_Positioning01 extends javax.swing.JFrame { 5 6 7 public ALT_Positioning01() { 8 initComponents(); 9 } 10 11 16 private void initComponents() { 18 jLabel3 = new javax.swing.JLabel (); 19 jLabel4 = new javax.swing.JLabel (); 20 jLabel5 = new javax.swing.JLabel (); 21 jTextField1 = new javax.swing.JTextField (); 22 jTextField2 = new javax.swing.JTextField (); 23 jTextField3 = new javax.swing.JTextField (); 24 jTextField4 = new javax.swing.JTextField (); 25 jTextField5 = new javax.swing.JTextField (); 26 jButton1 = new javax.swing.JButton (); 27 jButton2 = new javax.swing.JButton (); 28 29 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 30 jLabel3.setText("jLabel3"); 31 32 jLabel4.setText("jLabel4"); 33 34 jLabel5.setText("jLabel5"); 35 36 jTextField1.setText("jTextField1"); 37 38 jTextField2.setText("jTextField2"); 39 40 jTextField3.setText("jTextField3"); 41 42 jTextField4.setText("jTextField4"); 43 44 jTextField5.setText("jTextField5"); 45 46 jButton1.setText("jButton1"); 47 48 jButton2.setText("jButton2"); 49 50 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); 51 getContentPane().setLayout(layout); 52 layout.setHorizontalGroup( 53 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 54 .add(layout.createSequentialGroup() 55 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) 56 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 57 .addContainerGap() 58 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 59 .add(layout.createSequentialGroup() 60 .add(jLabel5) 61 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 287, Short.MAX_VALUE) 62 .add(jTextField4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 63 .add(layout.createSequentialGroup() 64 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 65 .add(layout.createSequentialGroup() 66 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 67 .add(jLabel3) 68 .add(jLabel4)) 69 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 287, Short.MAX_VALUE)) 70 .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() 71 .add(jButton2) 72 .add(26, 26, 26))) 73 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) 74 .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 75 .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 76 .add(jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))) 77 .add(layout.createSequentialGroup() 78 .add(31, 31, 31) 79 .add(jButton1) 80 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 225, Short.MAX_VALUE) 81 .add(jTextField5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) 82 .addContainerGap()) 83 ); 84 layout.setVerticalGroup( 85 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 86 .add(layout.createSequentialGroup() 87 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 88 .add(layout.createSequentialGroup() 89 .add(42, 42, 42) 90 .add(jButton2) 91 .add(4, 4, 4) 92 .add(jLabel3) 93 .add(15, 15, 15) 94 .add(jLabel4) 95 .add(22, 22, 22) 96 .add(jLabel5)) 97 .add(layout.createSequentialGroup() 98 .add(55, 55, 55) 99 .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 100 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 101 .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 102 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 103 .add(jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 104 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 105 .add(jTextField4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) 106 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 107 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 108 .add(jTextField5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 109 .add(jButton1)) 110 .addContainerGap(118, Short.MAX_VALUE)) 111 ); 112 pack(); 113 } 115 118 public static void main(String args[]) { 119 java.awt.EventQueue.invokeLater(new Runnable () { 120 public void run() { 121 new ALT_Positioning01().setVisible(true); 122 } 123 }); 124 } 125 126 private javax.swing.JButton jButton1; 128 private javax.swing.JButton jButton2; 129 private javax.swing.JLabel jLabel3; 130 private javax.swing.JLabel jLabel4; 131 private javax.swing.JLabel jLabel5; 132 private javax.swing.JTextField jTextField1; 133 private javax.swing.JTextField jTextField2; 134 private javax.swing.JTextField jTextField3; 135 private javax.swing.JTextField jTextField4; 136 private javax.swing.JTextField jTextField5; 137 139 } 140 | Popular Tags |