val alert = YesNoAlert( parent = stage title = "Confirmation Dialog with Custom Actions", header = "Look, a Confirmation Dialog with Custom Actions.", content = "Choose your option." ) val result = alert.showAndWait() result match { case Some(ButtonTypeYes) => println("... user chose \"Yes\"") case Some(ButtonTypeNo) => println("... user chose \"No\"") case _ => println("... user chose CANCEL or closed the dialog") }
parent window.
title of the dialog.
header text.
main content.
selected button.
Show a confirmation dialog with "Yes", "No", and "Cancel" buttons.