code: private void setProgressBarValue(int value, int maximum) {
  
      this.progressBar.setIndeterminate(false);
  
      if (this.progressBar.getMaximum() != maximum) {
        this.progressBar.setMaximum(maximum);
      }
  
      this.progressBar.setValue(value);
  
    }
docs: Updates the progress bar on this dialog.
  @param value The number of parts of the operation that have been
  completed.
  @param maximum The number of parts that compose the operation.