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