The basics of using Gridbagger

Adding components

To add a new component press the add button. This adds a new component to the layout which will have a randomly generated unique color as well as a text label that begins with the letter "C" followed by a unique number. The GridBagConstraints for this component will be the default constraints for the GridBagConstraints class or those which the user has set as being the default (See the Edit menu options to find out how to change the default). The newly added component becomes the current component and will be ringed by red and green stripes. The highlighting is animated by default but can be made static by going to the "Component hightlight" option in the edit menu.

The constraints for the current component are displayed in GridBagger's top window.

Changing the constraints

The constraints for the current component can be changed by first selecting a constraint by clicking on it, which will leave that constraint button in the depressed position. The plus and minus buttons will light up and these can be used to alter the selected constraint value. Other constraints can then similarly selected and altered and the new set of constraints will only be applied to the component when the apply button is pushed. The apply button will be lit-up only when there is a changed constraint which has not yet been applied.

If a new component is added or another component highlighted when the previous constraints have been changed but not applied, GridBagger will ask you if the changes should be ignored.

The insets constraint is not changed like other constraints. It uses a unique window which will pop-up when the constraint is selected. It should be noted that GridBagger allows constraints to be negative and this has meaning to GridBagLayout. See the primer page for details on this.

Selecting a new current component

By clicking on a component or by shifting the focus (using the tab key on Windows) a new current component can be selected and the red and green highlighting stripes will surround the newly selected component.