1 2 package org.netbeans.modules.form.layoutdesign; 3 4 public class ALT_DefaultSize01 extends javax.swing.JFrame { 5 6 7 public ALT_DefaultSize01() { 8 initComponents(); 9 } 10 11 16 private void initComponents() { 18 jButton1 = new javax.swing.JButton (); 19 20 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 21 jButton1.setText("jButton1"); 22 23 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); 24 getContentPane().setLayout(layout); 25 layout.setHorizontalGroup( 26 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 27 .add(layout.createSequentialGroup() 28 .addContainerGap() 29 .add(jButton1) 30 .addContainerGap(315, Short.MAX_VALUE)) 31 ); 32 layout.setVerticalGroup( 33 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 34 .add(layout.createSequentialGroup() 35 .addContainerGap() 36 .add(jButton1) 37 .addContainerGap(266, Short.MAX_VALUE)) 38 ); 39 pack(); 40 } 42 45 public static void main(String args[]) { 46 java.awt.EventQueue.invokeLater(new Runnable () { 47 public void run() { 48 new ALT_DefaultSize01().setVisible(true); 49 } 50 }); 51 } 52 53 private javax.swing.JButton jButton1; 55 57 } 58 | Popular Tags |