A working familiarity with the XmForm widget is helpful if you wish to understand the this layout manager. It's main benefit is that it gracefully resizes and repositions display components when the containing window is sized differently.
The three examples below illustrate how XmFormLayout will size and position display components differently as the applet's window size is varied. In these examples, there are four display components:
The constraints (see TestXFL.java) are:
String constraints[] = {
"Humpty.bottom=form.bottom-23",
"Humpty.left=form.left+21",
"Humpty.right=Tweedle.right",
"Tweedle.left=Humpty.left",
"Tweedle.top=form.top+24",
"Tweedle.bottom=Humpty.top-10",
"Dumpty.bottom=Humpty.bottom",
"Dumpty.left=Humpty.right+30",
"Dumpty.right=form.right-22",
"Dumpty.top=Humpty.top",
"Dee.bottom=Tweedle.bottom",
"Dee.top=Tweedle.top",
"Dee.left=Dumpty.left",
"Dee.right=Dumpty.right",
};