KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > form > layoutdesign > ALT_Positioning01


1
2 package org.netbeans.modules.form.layoutdesign;
3
4 public class ALT_Positioning01 extends javax.swing.JFrame JavaDoc {
5     
6     /** Creates new form ALT_Positioning01 */
7     public ALT_Positioning01() {
8         initComponents();
9     }
10     
11     /** This method is called from within the constructor to
12      * initialize the form.
13      * WARNING: Do NOT modify this code. The content of this method is
14      * always regenerated by the Form Editor.
15      */

16     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
17
private void initComponents() {
18         jLabel3 = new javax.swing.JLabel JavaDoc();
19         jLabel4 = new javax.swing.JLabel JavaDoc();
20         jLabel5 = new javax.swing.JLabel JavaDoc();
21         jTextField1 = new javax.swing.JTextField JavaDoc();
22         jTextField2 = new javax.swing.JTextField JavaDoc();
23         jTextField3 = new javax.swing.JTextField JavaDoc();
24         jTextField4 = new javax.swing.JTextField JavaDoc();
25         jTextField5 = new javax.swing.JTextField JavaDoc();
26         jButton1 = new javax.swing.JButton JavaDoc();
27         jButton2 = new javax.swing.JButton JavaDoc();
28
29         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
30         jLabel3.setText("jLabel3");
31
32         jLabel4.setText("jLabel4");
33
34         jLabel5.setText("jLabel5");
35
36         jTextField1.setText("jTextField1");
37
38         jTextField2.setText("jTextField2");
39
40         jTextField3.setText("jTextField3");
41
42         jTextField4.setText("jTextField4");
43
44         jTextField5.setText("jTextField5");
45
46         jButton1.setText("jButton1");
47
48         jButton2.setText("jButton2");
49
50         org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
51         getContentPane().setLayout(layout);
52         layout.setHorizontalGroup(
53             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
54             .add(layout.createSequentialGroup()
55                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
56                     .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
57                         .addContainerGap()
58                         .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
59                             .add(layout.createSequentialGroup()
60                                 .add(jLabel5)
61                                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 287, Short.MAX_VALUE)
62                                 .add(jTextField4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
63                             .add(layout.createSequentialGroup()
64                                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
65                                     .add(layout.createSequentialGroup()
66                                         .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
67                                             .add(jLabel3)
68                                             .add(jLabel4))
69                                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 287, Short.MAX_VALUE))
70                                     .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
71                                         .add(jButton2)
72                                         .add(26, 26, 26)))
73                                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
74                                     .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
75                                     .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
76                                     .add(jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))))
77                     .add(layout.createSequentialGroup()
78                         .add(31, 31, 31)
79                         .add(jButton1)
80                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 225, Short.MAX_VALUE)
81                         .add(jTextField5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
82                 .addContainerGap())
83         );
84         layout.setVerticalGroup(
85             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
86             .add(layout.createSequentialGroup()
87                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
88                     .add(layout.createSequentialGroup()
89                         .add(42, 42, 42)
90                         .add(jButton2)
91                         .add(4, 4, 4)
92                         .add(jLabel3)
93                         .add(15, 15, 15)
94                         .add(jLabel4)
95                         .add(22, 22, 22)
96                         .add(jLabel5))
97                     .add(layout.createSequentialGroup()
98                         .add(55, 55, 55)
99                         .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
100                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
101                         .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
102                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
103                         .add(jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
104                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
105                         .add(jTextField4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
106                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
107                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
108                     .add(jTextField5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
109                     .add(jButton1))
110                 .addContainerGap(118, Short.MAX_VALUE))
111         );
112         pack();
113     }// </editor-fold>//GEN-END:initComponents
114

115     /**
116      * @param args the command line arguments
117      */

118     public static void main(String JavaDoc args[]) {
119         java.awt.EventQueue.invokeLater(new Runnable JavaDoc() {
120             public void run() {
121                 new ALT_Positioning01().setVisible(true);
122             }
123         });
124     }
125     
126     // Variables declaration - do not modify//GEN-BEGIN:variables
127
private javax.swing.JButton JavaDoc jButton1;
128     private javax.swing.JButton JavaDoc jButton2;
129     private javax.swing.JLabel JavaDoc jLabel3;
130     private javax.swing.JLabel JavaDoc jLabel4;
131     private javax.swing.JLabel JavaDoc jLabel5;
132     private javax.swing.JTextField JavaDoc jTextField1;
133     private javax.swing.JTextField JavaDoc jTextField2;
134     private javax.swing.JTextField JavaDoc jTextField3;
135     private javax.swing.JTextField JavaDoc jTextField4;
136     private javax.swing.JTextField JavaDoc jTextField5;
137     // End of variables declaration//GEN-END:variables
138

139 }
140
Popular Tags