GridBag Layout
GridBag Layout (not to be confused with Grid Layout) lets you set almost any layout you want using a complex set of constraints. You can create a GridBag layout one of the following three ways:
- By using Forte for Java's Customize Layout... command on a form to bring up the customizer dialog box, which enables you to visually adjust the placement and constraints of the components. See Using the GridBag customizer for more information.
- By setting the constraints yourself under the Layout tab of the property sheet of every component within the layout.
- By creating an Absolute Layout and then switching to GridBag to have the constraints code generated automatically. If you use this option, you might want to go back and polish up the details using the two previous options.
GridBag Layout is particularly useful for multi-platform Java applications, because it enables you to create a free-form layout that maintains a consistent appearance, even when the platform and look and feel change.
Contents | Prev | Next | Index |