1 2 package org.netbeans.modules.form.layoutdesign; 3 4 public class ALT_Resizing03 extends javax.swing.JFrame { 5 6 7 public ALT_Resizing03() { 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, 18, Short.MAX_VALUE) 34 ); 35 jInternalFrame1Layout.setVerticalGroup( 36 jInternalFrame1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 37 .add(0, 232, 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(jLabel1) 56 .add(jInternalFrame1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 24, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 57 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 190, Short.MAX_VALUE) 58 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 59 .add(org.jdesktop.layout.GroupLayout.TRAILING, jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 60 .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() 61 .add(jButton2) 62 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 63 .add(jButton1))) 64 .addContainerGap()) 65 ); 66 layout.setVerticalGroup( 67 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 68 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 69 .addContainerGap() 70 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 71 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 72 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 73 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 191, Short.MAX_VALUE) 74 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 75 .add(jButton1) 76 .add(jButton2)) 77 .addContainerGap()) 78 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 79 .add(jLabel1) 80 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 81 .add(jInternalFrame1) 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_Resizing03().setVisible(true); 94 } 95 }); 96 } 97 98 private javax.swing.JButton jButton1; 100 private javax.swing.JButton jButton2; 101 private javax.swing.JInternalFrame jInternalFrame1; 102 private javax.swing.JLabel jLabel1; 103 private javax.swing.JScrollPane jScrollPane1; 104 private javax.swing.JTextArea jTextArea1; 105 107 } 108 | Popular Tags |