public class TestLayout {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display, SWT.SHELL_TRIM);
shell.setLayout( new GridLayout());
final Group current = new Group(shell , SWT.NONE);
current.setText("Group");
current.setLayout(new GridLayout());
current.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 3));
final Label label = new Label(current, SWT.NONE);
label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
label.setText("Test");
final Text text = new Text (current, SWT.MULTI|SWT.V_SCROLL|SWT.H_SCROLL|SWT.BORDER);
text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 3));
shell.pack();
shell.open();
// Set up the event loop.
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
// If no more entries in event queue
display.sleep();
}
}
display.dispose();
}