예제 #1
0
  public static boolean showConfirmPopup(
      Node graphic, String title, String header, String content) {
    Alert alert = new Alert(Alert.AlertType.CONFIRMATION, content, ButtonType.YES, ButtonType.NO);
    if (graphic != null) {
      alert.setGraphic(graphic);
    }
    alert.setTitle(title);
    alert.setHeaderText(header);

    Optional<ButtonType> result = alert.showAndWait();
    return result.get() == ButtonType.YES;
  }