|
Tutorial Example
IntroductionIn previous two tutorials, one problem was persistent. One always had to specify
the CellConstraints even when we were adding components in order. JGoodies
DefaultFormBuilder (supported via In this tutorial, you will see that all CellConstraints specifications are avoided.
Instead, we use tags
1. Specify DefaultFormBuilderTo use the PanelBuilder, first place
<panel> <formbuilder> <formlayout columnspec="pref, 4dlu, 50dlu, 4dlu, min" rowspec="pref, 2dlu, pref, 2dlu, pref, 2dlu, pref" > <form-rowgroup rows="3, 5, 7"/> </formlayout> </formbuilder> </panel> It is very important to have the 2. Add Swing ComponentsWith <label text="Label 3"/> <textfield/> <button text="..."/> For associated label and components using
<form-label text="Label 1" columnspan="3" nextline="true"> <textfield/> </form-label> Note that, to add a Swing component (w/o label) that spans several columns,
one still uses 3. Control Internal Layout Cursor LocationUse |