code: public void show(Window owner) {
          InvalidationListener viewTypeListener = obs -> loadDropDownValues(getDate());
          
          if (dialog != null) {
              dialog.show();
          } else {
              TimeRangeView timeRange = getSettingsView().getTimeRangeView();
              Scene scene = new Scene(this);
              dialog = new Stage();
              dialog.initOwner(owner);
              dialog.setScene(scene);
              dialog.sizeToScene();
              dialog.centerOnScreen();
              dialog.setTitle(Messages.getString("PrintView.TITLE_LABEL"));
              dialog.initModality(Modality.APPLICATION_MODAL);
              if (getPrintIcon() != null)
                  dialog.getIcons().add(getPrintIcon());
              
              dialog.setOnHidden(obs -> {
                  timeRange.cleanOldValues();
                  timeRange.viewTypeProperty().removeListener(viewTypeListener);
              }); 
              
              dialog.setOnShown(obs -> timeRange.viewTypeProperty().addListener(viewTypeListener));
              
              dialog.show();
          }
      }
docs: Creates an application-modal dialog and shows it after adding the print
  view to it.
  
  @param owner
  the owner window of the dialog