public static CEndlessProgressDialog show(
      final Window parent, final String description, final CEndlessHelperThread thread)
      throws Exception {
    final CEndlessProgressDialog dlg =
        new CEndlessProgressDialog(parent, Constants.DEFAULT_WINDOW_TITLE, description, thread);

    initializeWindowIcons(dlg);

    dlg.setSize(400, dlg.getPreferredSize().height);
    dlg.setMinimumSize(new Dimension(400, dlg.getPreferredSize().height));
    dlg.setMaximumSize(
        new Dimension(Math.max(400, dlg.getPreferredSize().width), dlg.getPreferredSize().height));
    dlg.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);

    thread.start();

    dlg.setVisible(true);

    // TODO(cblichmann): Remove this and fix all call sites to work with
    // the getException() method directly.
    if (thread.getException() != null) {
      throw thread.getException();
    }

    return dlg;
  }
Shows a new progress dialog.

@param parent Parent window of the progress dialog. This argument can be null.
@param description Description shown in the progress dialog.
@param thread Background worker thread executed while the progress dialog is visible.
@return The progress dialog itself.
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/dialogs/ProgressDialog.java