1 2 package org.netbeans.modules.form.layoutdesign; 3 4 public class ALT_Resizing01 extends javax.swing.JFrame { 5 6 7 public ALT_Resizing01() { 8 initComponents(); 9 } 10 11 16 private void initComponents() { 18 jLabel1 = new javax.swing.JLabel (); 19 jInternalFrame1 = new javax.swing.JInternalFrame (); 20 jScrollPane1 = new javax.swing.JScrollPane (); 21 jTextArea1 = new javax.swing.JTextArea (); 22 jButton1 = new javax.swing.JButton (); 23 jButton2 = new javax.swing.JButton (); 24 25 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 26 jLabel1.setText("jLabel1"); 27 28 jInternalFrame1.setVisible(true); 29 org.jdesktop.layout.GroupLayout jInternalFrame1Layout = new org.jdesktop.layout.GroupLayout(jInternalFrame1.getContentPane()); 30 jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout); 31 jInternalFrame1Layout.setHorizontalGroup( 32 jInternalFrame1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 33 .add(0, 264, Short.MAX_VALUE) 34 ); 35 jInternalFrame1Layout.setVerticalGroup( 36 jInternalFrame1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 37 .add(0, 203, Short.MAX_VALUE) 38 ); 39 40 jTextArea1.setColumns(20); 41 jTextArea1.setRows(5); 42 jScrollPane1.setViewportView(jTextArea1); 43 44 jButton1.setText("jButton1"); 45 46 jButton2.setText("jButton2"); 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(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 56 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 57 .add(jLabel1) 58 .add(jInternalFrame1)) 59 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 60 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 61 .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() 62 .add(jButton2) 63 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 64 .add(jButton1))) 65 .addContainerGap()) 66 ); 67 layout.setVerticalGroup( 68 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 69 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 70 .addContainerGap() 71 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 72 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 73 .add(jLabel1) 74 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 75 .add(jInternalFrame1)) 76 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 77 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 78 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 79 .add(jButton1) 80 .add(jButton2)) 81 .addContainerGap()) 82 ); 83 pack(); 84 } 86 89 public static void main(String args[]) { 90 java.awt.EventQueue.invokeLater(new Runnable () { 91 public void run() { 92 new ALT_Resizing01().setVisible(true); 93 } 94 }); 95 } 96 97 private javax.swing.JButton jButton1; 99 private javax.swing.JButton jButton2; 100 private javax.swing.JInternalFrame jInternalFrame1; 101 private javax.swing.JLabel jLabel1; 102 private javax.swing.JScrollPane jScrollPane1; 103 private javax.swing.JTextArea jTextArea1; 104 106 } 107 | Popular Tags |