Alert is class in javafx 1.3 but in javafx 2.1, is not. So what is replacement of alert in javafx 2.1 ?
Teocali is correct. Alert dialogs go into the platform in 3.0, which is currently under development.
JavaFX 2.2 features support for dialogs which suspend execution when they are displayed. This makes creating your own alert implementation (by calling
stage.showAndWait()) pretty trivial.
(to access the JavaFX jira links in this answer, you can sign up for a jira account upon clicking on one of the links).
Jonathan Giles (a JavaFX developer) notes:
The Dialogs class (as it is currently called) did not make it into JavaFX 2.2, due to lack of time. I have just now pushed my proof of concept Dialogs class into the JavaFX Lombard (aka 3.0) repo, so it may possibly be included in that release. Whilst a long way off, at least with public builds to start soon, you can develop your applications using the JavaFX 3.0 builds and make use of the API (and provide feedback on how to improve it).
I created a Modal Confirm dialog sample.
Anton created a JavaFXDialog project.
For what it's worth, I don't think there is any support for modal dialog in JavaFx 2.0 for the moment, and so for Alert style dialog box. Maybe you will find more information here : How to create and show common dialog (Error, Warning, Confirmation) in JavaFX 2.0?