Edit menu options

Undo last constraints change

As soon as the Apply button is pressed for a component this menu option is enabled. Selecting undo will then bring back the GridBagConstraints values that were set for that component prior to pressing Apply. If the undo is applied a second time it undo's the undo. If another component is now selected the undo option is disabled until a change is made to that new components constraints.

If the "chained undo" option is switched on via the Settings menu then each time the Apply button is pushed for a component, GridBagger will track all the GridBagConstraint changes made. Selecting undo will then bring back the previous constraints for the component. Repeating undo will move back through the chain of changes until there are none left.

Remove all components

This option will remove all components from the current layout. Be warned that this is irreversable, so save any layout that's important.

List all components and select or delete

This option is provided as a means to deal with components that are not visible in the layout. Sometimes when changing constraints, one component will overlay another so that it is no longer possible to click on the hidden component to manipulate it. This option presents a named list of all components in the current layout. Each component can either be selected to change it's constraints or deleted from the layout even though it may not be visible.

Pack layout and resize

This will perform a "pack()" on the layout window and then resize the window to give the minimum size for the layout. The pack can be reversed by dragging the window back to a bigger size.

Set default to current constraints

By invoking this option the constraints for the currently highlighted component are saved and will be used as the initial constraints for any component that's subsequently added. If you want all new components to have say, weightx and weighty to have values of 1, then this is the way to do it. To revert back to using the GridBagConstraints class default, invoke the next menu option which is "Reset default constraints".