KickJava   Java API By Example, From Geeks To Geeks.

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


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

79     /**
80      * @param args the command line arguments
81      */

82     public static void main(String JavaDoc args[]) {
83         java.awt.EventQueue.invokeLater(new Runnable JavaDoc() {
84             public void run() {
85                 new ALT_Indent03().setVisible(true);
86             }
87         });
88     }
89     
90     // Variables declaration - do not modify//GEN-BEGIN:variables
91
private javax.swing.JLabel JavaDoc jLabel1;
92     private javax.swing.JLabel JavaDoc jLabel2;
93     private javax.swing.JLabel JavaDoc jLabel3;
94     private javax.swing.JLabel JavaDoc jLabel4;
95     private javax.swing.JList JavaDoc jList1;
96     private javax.swing.JScrollPane JavaDoc jScrollPane1;
97     // End of variables declaration//GEN-END:variables
98

99 }
100
Popular Tags