📜  javafx 打开警报窗口 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:47.849000             🧑  作者: Mango

代码示例1
Alert alert = new Alert(AlertType.CONFIRMATION, "Delete " + selection + " ?", ButtonType.YES, ButtonType.NO, ButtonType.CANCEL);
alert.showAndWait();

if (alert.getResult() == ButtonType.YES) {
    //do stuff
}