public class MyLayout {
public static void main (String [] args) {
Display display = new Display ();
Shell shell = new Shell (display);
FormLayout formLayout = new FormLayout ();
shell.setLayout (formLayout);
Composite composite0 = new Composite (shell, SWT.BORDER);
FormData data = "" FormData ();
composite0.setLayoutData (data);
// why is this hidden behind the composite?
Text text2 = new Text (shell, SWT.BORDER);
text2.setText ("text2");
FormData data1 = new FormData ();
data1.right = new FormAttachment (composite0, 10,
SWT.RIGHT);
// data1.left = new FormAttachment (composite0, 10,
SWT.RIGHT);
data1.bottom = new FormAttachment (composite0, 0,
SWT.BOTTOM);
text2.setLayoutData (data1);