KickJava   Java API By Example, From Geeks To Geeks.

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


1
2 package org.netbeans.modules.form.layoutdesign;
3
4 public class ALT_ParallelPosition19 extends javax.swing.JFrame JavaDoc {
5     
6     /** Creates new form ALT_ParallelPosition19 */
7     public ALT_ParallelPosition19() {
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         jTextField1 = new javax.swing.JTextField JavaDoc();
19         jTextField2 = new javax.swing.JTextField JavaDoc();
20         jTextField3 = new javax.swing.JTextField JavaDoc();
21         jScrollPane1 = new javax.swing.JScrollPane JavaDoc();
22         jList1 = new javax.swing.JList JavaDoc();
23
24         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
25         jTextField1.setText("jTextField1");
26
27         jTextField2.setText("jTextField2");
28
29         jTextField3.setText("jTextField3");
30
31         jList1.setModel(new javax.swing.AbstractListModel JavaDoc() {
32             String JavaDoc[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
33             public int getSize() { return strings.length; }
34             public Object JavaDoc getElementAt(int i) { return strings[i]; }
35         });
36         jScrollPane1.setViewportView(jList1);
37
38         org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
39         getContentPane().setLayout(layout);
40         layout.setHorizontalGroup(
41             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
42             .add(layout.createSequentialGroup()
43                 .addContainerGap()
44                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
45                     .add(jTextField1, 0, 337, Short.MAX_VALUE)
46                     .add(jTextField2, 0, 337, Short.MAX_VALUE)
47                     .add(jTextField3, 0, 337, Short.MAX_VALUE))
48                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
49                 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
50                 .addContainerGap())
51         );
52         layout.setVerticalGroup(
53             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
54             .add(layout.createSequentialGroup()
55                 .addContainerGap()
56                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
57                     .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
58                     .add(layout.createSequentialGroup()
59                         .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
60                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
61                         .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
62                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
63                         .add(jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
64                 .addContainerGap(157, Short.MAX_VALUE))
65         );
66         pack();
67     }// </editor-fold>//GEN-END:initComponents
68

69     /**
70      * @param args the command line arguments
71      */

72     public static void main(String JavaDoc args[]) {
73         java.awt.EventQueue.invokeLater(new Runnable JavaDoc() {
74             public void run() {
75                 new ALT_ParallelPosition19().setVisible(true);
76             }
77         });
78     }
79     
80     // Variables declaration - do not modify//GEN-BEGIN:variables
81
private javax.swing.JList JavaDoc jList1;
82     private javax.swing.JScrollPane JavaDoc jScrollPane1;
83     private javax.swing.JTextField JavaDoc jTextField1;
84     private javax.swing.JTextField JavaDoc jTextField2;
85     private javax.swing.JTextField JavaDoc jTextField3;
86     // End of variables declaration//GEN-END:variables
87

88 }
89
Popular Tags