JavaFX Strange behaviour with progress indicator

I'm doing a login screen and I want to show a progress indicator while I do the user authentication process. I'm doing something like this.

// Handler for Button[fx:id="login"] onAction
public void handleLogin(ActionEvent event) {
    // Show loading indicator

    // User authentication
    String userName = user.getText();
    String password = psw.getText();

    OrdLogin ord = new OrdLogin();

    Authentication auth = orden.getInfoAutenticacion();
    if(auth == null){
        // Remove the loading indicator

        // Show an error message
        msgError.setText("Incorrect password/user");
    } else {
        // login successful!

private void showLoadingImg() {     
    // Show loading indicator
    ProgressIndicator progress = new ProgressIndicator();

If I run showLoadingImg() in my initialize method, the indicator is displayed correctly, but when I do showLoadingImg() inside handleLogin the indicator is not displayed. Any clues?


If auth is null then the progress indicator is being removed from the contProgress container. Have you debugged through the software to see if this is happening?


 ? Multithreading in JavaFX hangs the UI
 ? JavaFx Progress cannot be to solve a variable
 ? MVC with javaFX
 ? How to show a progress bar while downloading in javafx
 ? JavaFX Change text under Progress Indicator (default: Done)
 ? JavaFX Change text under Progress Indicator (default: Done)
 ? JavaFX Change text under Progress Indicator (default: Done)
 ? Change JavaFX progress bar style
 ? Set default skin in JavaFX with ComboBox
 ? Remove rectangle from Progress Indicator