content: package myswtapp;
  
  import org.eclipse.jface.dialogs.MessageDialog;
  import org.eclipse.swt.SWT;
  import org.eclipse.swt.events.SelectionAdapter;
  import org.eclipse.swt.events.SelectionEvent;
  import org.eclipse.swt.layout.GridData;
  import org.eclipse.swt.layout.GridLayout;
  import org.eclipse.swt.widgets.Button;
  import org.eclipse.swt.widgets.Display;
  import org.eclipse.swt.widgets.Shell;
  
  import myswtlib.HelloWorld;
  
  public final class Main {
  
    public static void main(String[] args) {
      Display display = new Display();
      try {
        final Shell shell = new Shell(display);
        shell.setText(Messages.getString("WindowTitle"));
        shell.setLayout(new GridLayout(5, true));
        Button btnShowDialog = new Button(shell, SWT.PUSH);
        btnShowDialog.setText(Messages.getString("btnShowDialog_Label"));
        btnShowDialog.setLayoutData(new GridData());
        btnShowDialog.addSelectionListener(new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent event) {
            HelloWorld.showMessageDialog(shell);
          }
        });
        shell.open();
        while (!shell.isDisposed())
          if (!display.readAndDispatch())
            display.sleep();
      } finally {
        display.dispose();
      }
    }
  }
  