code: public static Dialog<String[]> getDialog(String title, ButtonType ok) {
          Dialog<String[]> dialog = new Dialog<>();
          dialog.setTitle(title);
          dialog.setHeaderText(null);
  
          dialog.initModality(Modality.APPLICATION_MODAL);
  
          // 自定义确认和取消按钮
          ButtonType cancel = new ButtonType(CANCEL_BUTTON_TEXT, ButtonData.CANCEL_CLOSE);
          dialog.getDialogPane().getButtonTypes().addAll(ok, cancel);
          return dialog;
      }
docs: 获得一个{@link Dialog}对象
  
  @param title 标题
  @param ok 确认按钮
  
  @return {@link Dialog}