KickJava   Java API By Example, From Geeks To Geeks.

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


1
2 package org.netbeans.modules.form.layoutdesign;
3
4 public class ALT_ParallelPosition21 extends javax.swing.JFrame JavaDoc {
5     
6     /** Creates new form ALT_ParallelPosition21 */
7     public ALT_ParallelPosition21() {
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         jLabel1 = new javax.swing.JLabel JavaDoc();
19         jScrollPane1 = new javax.swing.JScrollPane JavaDoc();
20         jList1 = new javax.swing.JList JavaDoc();
21         jScrollPane2 = new javax.swing.JScrollPane JavaDoc();
22         jTextArea1 = new javax.swing.JTextArea JavaDoc();
23
24         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
25         jLabel1.setText("jLabel1");
26
27         jList1.setModel(new javax.swing.AbstractListModel JavaDoc() {
28             String JavaDoc[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
29             public int getSize() { return strings.length; }
30             public Object JavaDoc getElementAt(int i) { return strings[i]; }
31         });
32         jScrollPane1.setViewportView(jList1);
33
34         jTextArea1.setColumns(20);
35         jTextArea1.setRows(5);
36         jScrollPane2.setViewportView(jTextArea1);
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(jLabel1)
46                     .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
47                 .add(43, 43, 43)
48                 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
49                 .addContainerGap(206, Short.MAX_VALUE))
50         );
51         layout.setVerticalGroup(
52             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
53             .add(layout.createSequentialGroup()
54                 .addContainerGap()
55                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
56                     .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
57                     .add(layout.createSequentialGroup()
58                         .add(jLabel1)
59                         .add(86, 86, 86)
60                         .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
61                 .addContainerGap(125, Short.MAX_VALUE))
62         );
63         pack();
64     }// </editor-fold>//GEN-END:initComponents
65

66     /**
67      * @param args the command line arguments
68      */

69     public static void main(String JavaDoc args[]) {
70         java.awt.EventQueue.invokeLater(new Runnable JavaDoc() {
71             public void run() {
72                 new ALT_ParallelPosition21().setVisible(true);
73             }
74         });
75     }
76     
77     // Variables declaration - do not modify//GEN-BEGIN:variables
78
private javax.swing.JLabel JavaDoc jLabel1;
79     private javax.swing.JList JavaDoc jList1;
80     private javax.swing.JScrollPane JavaDoc jScrollPane1;
81     private javax.swing.JScrollPane JavaDoc jScrollPane2;
82     private javax.swing.JTextArea JavaDoc jTextArea1;
83     // End of variables declaration//GEN-END:variables
84

85 }
86
Popular Tags