public static void main(String[] args) {
    Display display = new Display();
    final Shell shell = new Shell(display);
    Util.setCenteredBounds(shell, 200, 100);
    shell.setLayout(new GridLayout());

    Button bt = new Button(shell, SWT.PUSH);
    bt.setText("Open Dialog");
    bt.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true));
    bt.addSelectionListener(
        new SelectionAdapter() {
          public void widgetSelected(SelectionEvent e) {
            WebInterfaceDialog dialog = new WebInterfaceDialog(shell);
            dialog.open();
          }
        });

    shell.open();
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) display.sleep();
    }
    display.dispose();
  }
 public void open() {
   Util.setCenteredBounds(shell, 300, 200);
   shell.open();
 }