File menu options

The file menu is used for saving a layout to a file whose name is user-defined, as well as restoring layouts from files. The files are saved in a directory with the name "layouts" and are readable only by the GridBagger program. The layout files store the details of each component, including the constraints, color, text, preferred size (if any), as well as the original size of the containing window. All of these are restored when the file is opened.

The last 4 recently opened file names will appear before the exit option at the bottom of the menu and these can be reopened by clicking on them.

The file chooser for opening a layout

When opening a layout the file chooser will show a thumbnail of the layout as shown below.

The thumbnail is a reduced form of the layout and is accurate except for the original container shape. The thumbnail is always displayed in the same rectangular box. Set preferred sizes are shown in the thumbnail but not the text.

Save and Save as...

These work as you would expect with the "Save as..." option allowing you to save the current layout with a new file name. GridBagger is careful to keep track of any changes made to a layout that comes from a file and will provide a prompt if a layout is changed and not saved before moving on to another layout.

Recent files

The file names of the last four saved layouts are appended to the file menu. Any of these can be reopened by clicking on them.