code: public void show(boolean modal) {
      if (modal) {
        dialog.initModality(Modality.APPLICATION_MODAL);
        dialog.showAndWait();
      } else {
        dialog.initModality(Modality.NONE);
        dialog.show();
      }
    }
docs: Opens {@link PreferencesFx} in a dialog window.
  
  @param modal if true, will not allow the user to interact with any other window than
  the {@link PreferencesFxDialog}, as long as it is open.