Basics
Guides
API Reference
Basics
Guides
API Reference
[13:7] extends: FxObj
Wraps JavaFX Alert, a pre-built dialog for displaying informational, warning, confirmation, or error messages with standard button responses. The alert type (INFORMATION, WARNING, CONFIRMATION, ERROR, or NONE) controls the icon and default buttons shown. Optional title, header, and content text can be set before displaying. Call showAndWait() to block until the user responds, or show() to display the dialog without blocking.
Alert (string AlertType = "INFORMATION", string Text = "")
Creates a new Alert with the specified type and optional content text.
AlertType is a string: INFORMATION, WARNING, CONFIRMATION, ERROR, or NONE.Text is an optional string with content text.setTitle (string Title)
Sets the dialog title.
Title is a string with the title.this object for chainingsetHeaderText (string Text)
Sets the header text.
Text is a string with the header, or null for none.this object for chainingsetContentText (string Text)
Sets the content text.
Text is a string with the content.this object for chainingshowAndWait ()
Shows the dialog and waits for the user to close it.
The result of the dialog.setGraphic (object GraphicNode)
Sets a graphic node displayed in the dialog header area.
GraphicNode is a Node object to use as the header graphic.this object for chaininggetResult ()
Returns the ButtonType that was clicked to close the dialog after showAndWait.
A ButtonType object representing the button the user clicked.addButton (string ButtonType)
Adds a custom button to the alert dialog.
ButtonType is a string matching a ButtonType constant name, e.g., OK or CANCEL.this object for chaininggetDialogPane ()
Returns the DialogPane of this alert, which contains the layout and buttons.
A DialogPane object with the alert's dialog pane.show ()
Shows the dialog without blocking.
this object for chaining
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.