createAcceptButton();
  public AccountDialog(Display display, TrackDatabase trackDatabase, DownloadThread downloadThread) {    this.shell = new Shell(display);    this.trackDatabase = trackDatabase;    shell.addShellListener(new ShellAdapter() {      public void shellClosed(ShellEvent e) {        done = true;      }    });    shell.setText("Account Settings");    GridLayout layout = new GridLayout(2, false);    shell.setLayout(layout);//    new Label(shell, SWT.NONE).setText(//      "Please choose a User name and password. If\n"//        + "the User does not exist it will be created.");      createUserInfo();    new Label(shell, SWT.NONE).setText("Password");    final Text txtPassword = new Text(shell, SWT.SINGLE | SWT.BORDER);    txtPassword.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL));    String password = trackDatabase.getPassword();    if (password.length() == 0)      password = randomString(10);    txtPassword.setText(password);    new Label(shell, SWT.NONE).setText("Server");    txtServer = new Text(shell, SWT.SINGLE | SWT.BORDER);    txtServer.setLayoutData(      new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL));    txtServer.setText(trackDatabase.getHost());    new Label(shell, SWT.NONE).setText("Port");    txtPort = new Text(shell, SWT.SINGLE | SWT.BORDER);    txtPort.setLayoutData(      new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL));    txtPort.setText(Integer.toString(trackDatabase.getPort()));    createAcceptButton();    Button btnCancel = new Button(shell, SWT.NONE);    btnCancel.setText("Cancel");    btnCancel.addSelectionListener(new SelectionAdapter() {      public void widgetSelected(SelectionEvent e) {        done = true;        System.exit(0);      }    });    shell.addShellListener(new ShellAdapter() {      public void shellClosed(ShellEvent e) {        done = true;        System.exit(0);      }    });    shell.pack();    shell.open();    while (!done) {      if (!display.readAndDispatch())        display.sleep();    }    shell.close();    shell.dispose();  }