1 2 package org.netbeans.modules.form.layoutdesign; 3 4 public class ALT_Resizing04 extends javax.swing.JFrame { 5 6 7 public ALT_Resizing04() { 8 initComponents(); 9 } 10 11 16 private void initComponents() { 18 jScrollPane1 = new javax.swing.JScrollPane (); 19 jTree1 = new javax.swing.JTree (); 20 jTextField1 = new javax.swing.JTextField (); 21 jPanel1 = new javax.swing.JPanel (); 22 jButton1 = new javax.swing.JButton (); 23 jButton2 = new javax.swing.JButton (); 24 jButton3 = new javax.swing.JButton (); 25 26 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 27 jScrollPane1.setViewportView(jTree1); 28 29 jTextField1.setText("jTextField1"); 30 31 org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); 32 jPanel1.setLayout(jPanel1Layout); 33 jPanel1Layout.setHorizontalGroup( 34 jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 35 .add(0, 209, Short.MAX_VALUE) 36 ); 37 jPanel1Layout.setVerticalGroup( 38 jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 39 .add(0, 305, Short.MAX_VALUE) 40 ); 41 42 jButton1.setText("jButton1"); 43 44 jButton2.setText("jButton2"); 45 46 jButton3.setText("jButton3"); 47 48 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); 49 getContentPane().setLayout(layout); 50 layout.setHorizontalGroup( 51 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 52 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 53 .addContainerGap() 54 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 55 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 105, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 56 .add(jButton1) 57 .add(jButton2) 58 .add(jButton3)) 59 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 60 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) 61 .add(jPanel1) 62 .add(org.jdesktop.layout.GroupLayout.TRAILING, jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 209, Short.MAX_VALUE)) 63 .addContainerGap(74, Short.MAX_VALUE)) 64 ); 65 layout.setVerticalGroup( 66 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 67 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 68 .addContainerGap() 69 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 70 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 71 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 291, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 72 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 73 .add(jButton1) 74 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 75 .add(jButton2) 76 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 77 .add(jButton3)) 78 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 79 .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 80 .add(53, 53, 53) 81 .add(jPanel1))) 82 .addContainerGap()) 83 ); 84 pack(); 85 } 87 90 public static void main(String args[]) { 91 java.awt.EventQueue.invokeLater(new Runnable () { 92 public void run() { 93 new ALT_Resizing04().setVisible(true); 94 } 95 }); 96 } 97 98 private javax.swing.JButton jButton1; 100 private javax.swing.JButton jButton2; 101 private javax.swing.JButton jButton3; 102 private javax.swing.JPanel jPanel1; 103 private javax.swing.JScrollPane jScrollPane1; 104 private javax.swing.JTextField jTextField1; 105 private javax.swing.JTree jTree1; 106 108 } 109 | Popular Tags |