question: private void alertFailedLogin ( final String message ) { final Alert alert = new Alert ( Alert . AlertType . ERROR ) ; alert . setTitle ( "Error Login" ) ; alert . setHeaderText ( "Unfortunately, your login has failed" ) ; alert . setContentText ( message != null ? message : "" + "\nPress OK to try again." ) ; alert . showAndWait ( ) ; }
target:  Displays an error dialog with a message.