FormLayout
FormLayout
Most recent release 2008-July-14

FormLayout is a Java class for controlling the layout interface components in a panel. It is appropriate to use with Swing or AWT components. It includes some of the features of SpringLayout provided by Sun Microsystems or the FormLayout class provided by IBM in Eclipse, but is simpler to use than either of them. It uses constraints to place components a fixed distance from other components, or proportionally placed within the window. The constraints are:

The July 2008 release improves the handling of proportional positioning, correcting a bug in the previous release.

The April 2006 release uses a modified determination of container size that prevents problems in the first release which could cause some containers to be too small.

The class is provided only as source code. The file is 28K in size. A Javadoc description of the class and its methods is available for viewing. A small example program using FormLayout is also available. For comparison, there is an equivalent example using GridBag layout, one using Border and Box layout, and another using Spring layout.


Mail to Graham Freeman


< < Back