1 2 package org.netbeans.modules.form.layoutdesign; 3 4 public class ALT_Resizing08 extends javax.swing.JFrame { 5 6 7 public ALT_Resizing08() { 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 jLabel3 = new javax.swing.JLabel (); 22 jButton1 = new javax.swing.JButton (); 23 24 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 25 jLabel1.setText("jLabel1"); 26 27 jTextField1.setText("jTextField1"); 28 29 jLabel2.setText("jLabel2"); 30 31 jLabel3.setText("jLabel3"); 32 33 jButton1.setText("jButton1"); 34 35 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); 36 getContentPane().setLayout(layout); 37 layout.setHorizontalGroup( 38 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 39 .add(layout.createSequentialGroup() 40 .addContainerGap() 41 .add(jLabel1) 42 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 43 .add(jTextField1, 0, 261, Short.MAX_VALUE) 44 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 45 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 46 .add(jButton1) 47 .add(layout.createSequentialGroup() 48 .add(jLabel3) 49 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 50 .add(jLabel2))) 51 .addContainerGap()) 52 ); 53 layout.setVerticalGroup( 54 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 55 .add(layout.createSequentialGroup() 56 .addContainerGap() 57 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 58 .add(jLabel1) 59 .add(jLabel2) 60 .add(jLabel3) 61 .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 62 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 63 .add(jButton1) 64 .addContainerGap(240, Short.MAX_VALUE)) 65 ); 66 pack(); 67 } 69 72 public static void main(String args[]) { 73 java.awt.EventQueue.invokeLater(new Runnable () { 74 public void run() { 75 new ALT_Resizing08().setVisible(true); 76 } 77 }); 78 } 79 80 private javax.swing.JButton jButton1; 82 private javax.swing.JLabel jLabel1; 83 private javax.swing.JLabel jLabel2; 84 private javax.swing.JLabel jLabel3; 85 private javax.swing.JTextField jTextField1; 86 88 } 89 | Popular Tags |