Package javax.swing.GroupLayout

Examples of javax.swing.GroupLayout.SequentialGroup.addComponent()


    //Create a sequential group
    SequentialGroup v1 = layout.createSequentialGroup();
    //Add a container gap to the sequential group v1
    v1.addContainerGap();
    //Add a label to the sequential group v1
    v1.addComponent(jLabel1);
    v1.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED);
    //Add scroll panel to the sequential group v1
    v1.addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE);
    v1.addContainerGap();
    //Add the group v1 to vGroup
View Full Code Here


    v1.addContainerGap();
    //Add a label to the sequential group v1
    v1.addComponent(jLabel1);
    v1.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED);
    //Add scroll panel to the sequential group v1
    v1.addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE);
    v1.addContainerGap();
    //Add the group v1 to vGroup
    vGroup.addGroup(v1);
    //Create the vertical group
    layout.setVerticalGroup(vGroup);
View Full Code Here

        }
        jPanel1Layout.setHorizontalGroup(horisontalGroup);
        ParallelGroup verticalGroup = jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING);
        SequentialGroup sequentialGroup = jPanel1Layout.createSequentialGroup();
        for (JComponent jLabel : components) {
            sequentialGroup.addComponent(jLabel);
            sequentialGroup.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED);
        }
        verticalGroup.addGroup(sequentialGroup);
        jPanel1Layout.setVerticalGroup(verticalGroup);
        return panel;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.