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();
}

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 ( ) ; }
displays an error dialog with a message .
