---++ !FormLayout

!FormLayout offers an enormous amount of flexibility, like GridLayout, but in an extremely different fashion.

When using a GridLayout, it is necessary to plan ahead, as the order in which you add your widgets is the order in which they appear in the grid. When using a !FormLayout, each widget is separate from all other widgets in terms of the overall layout.

In !FormLayout, the FormData object is absolutely crucial. If you do not assign a FormData object to each widget, they will all be placed in the same default space, and all your widgets will simply sit on top of one another.

Each widget has its own FormData object, which is placed by using FormAttachments. The idea behind the FormAttachments, and essentially behind the !FormLayout, is that we can tack the edges of the widgets to various places on the window. We can assign positions for the top, bottom, left and right edges of each widget. We can define these positions as being percentages, offsets from other widgets, or even alignments. To fully get a handle on how FormAttachments work, we will go over a fairly complex example.