Example usage for com.jgoodies.forms.layout CellConstraints xy

List of usage examples for com.jgoodies.forms.layout CellConstraints xy

Introduction

In this page you can find the example usage for com.jgoodies.forms.layout CellConstraints xy.

Prototype

public CellConstraints xy(int col, int row, String encodedAlignments) 

Source Link

Document

Sets column and row origins; sets width and height to 1; decodes horizontal and vertical alignments from the given string.

Examples:

 cc.xy(1, 3, "left, bottom"); cc.xy(1, 3, "l, b"); cc.xy(1, 3, "center, fill"); cc.xy(1, 3, "c, f"); 

Usage

From source file:com.salas.bb.installation.wizard.TutorialPage.java

License:Open Source License

/**
 * Builds the panel./*  www.j  av  a  2s  .  c o m*/
 */
public void build(JComponent buttonBar) {
    buttonBar.setBorder(Borders.createEmptyBorder("6dlu, 6dlu, 6dlu, 6dlu"));

    FormLayout layout = new FormLayout("15dlu, left:min:grow, 15dlu", "pref, 17dlu, min:grow, 2dlu, pref");
    PanelBuilder builder = new PanelBuilder(layout, this);
    CellConstraints cc = new CellConstraints();

    builder.add(buildHeader(), cc.xyw(1, 1, 3));
    builder.add(buildTutorialPanel(), cc.xy(2, 3, "f, f"));
    builder.add(buttonBar, cc.xyw(1, 5, 3));
}