import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.RowLayout;

public class Hello {

    public static void main(String[] args) {
        Display display = new Display();
        final Shell shell = new Shell(display);
        RowLayout layout = new RowLayout();
        layout.justify = true;
        layout.pack = true;
        shell.setLayout(layout);
        shell.setText("Hello, World!");
        Label label = new Label(shell, SWT.CENTER);
        label.setText("Hello, World!");
        shell.pack();
        shell.open ();
        while (!shell.isDisposed()) {
            if (!display.readAndDispatch()) display.sleep ();
        }
       display.dispose ();
}
}
