com.partnersoft.gui.forms
Class FormPanel
java.lang.Object
com.partnersoft.gui.forms.FormPanel
public class FormPanel
- extends java.lang.Object
Sets up a panel with a form layout. It has the standard 2-column form layout,
a column of labels and a column of controls, with the option of adding rows
that span both columns.
Call addRow(JComponent, JComponent) to add a label and control pair, and
addRow(JComponent) to add a row that spans both columns. The rows are
displayed in the order they are added. Call getPanel() to get the root panel.
This implementation uses GroupLayout, which has a couple of nice properties:
the components are vertically aligned along their baseline, which makes the
left-to-right flow look better, and they are spaced according to the
look-and-feel defaults, which makes the form look more like a native form.
- Author:
- russell
|
Method Summary |
void |
addRow(javax.swing.JComponent control)
|
void |
addRow(javax.swing.JComponent label,
javax.swing.JComponent control)
|
javax.swing.JPanel |
getPanel()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormPanel
public FormPanel()
addRow
public void addRow(javax.swing.JComponent label,
javax.swing.JComponent control)
addRow
public void addRow(javax.swing.JComponent control)
getPanel
public javax.swing.JPanel getPanel()