title: JAVAFX - Label field not updating on action event handler
body: <p>I'm a newbie to JAVAFX. I have a login form in JavaFx application. It has a Label field defined in fxml file, whose text value is set after authentication with different messages. Please see code below.</p>
  
  <p><strong>CODE</strong></p>
  
  <pre><code>if(userid&gt;0){ 
      //the below setText call doesn't work and update the UI
      actiontarget.setText("Modems are initializing. It may take longer time... ");
      bootstrap =new Bootstrap();
      new Thread(){
          public void run(){
              bootstrap.run();
          }
      }.start();  
      while(!bootstrap.isSet()){
          try {
              Thread.sleep(3000);
          } catch (InterruptedException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
          // the below call also doesn't work
          actiontarget.setText("Modems are getting initialized. Please wait for sometime..");
      }
      serialModemList=bootstrap.getSerialModemList();
      getPanelList(serialModemList);
  
  }else{
      // this one method call works fine. not sure why?
      actiontarget.setText("Invalid Terminal and Password ");
  }
  </code></pre>
  
  <p>The call <code>actiontarget.setText(..)</code> doesn't work when the user is valid. but, it works if the user enters invalid credentials. Please let me know what's wrong with the code.</p>
  
  <p><strong>FXML</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;?import java.net.*?&gt;
  &lt;?import javafx.geometry.*?&gt;
  &lt;?import javafx.scene.control.*?&gt;
  &lt;?import javafx.scene.layout.*?&gt;
  &lt;?import javafx.scene.text.*?&gt;
  &lt;?import javafx.scene.image.*?&gt;
  
  &lt;BorderPane maxHeight="-Infinity" maxWidth="-Infinity"
      minHeight="-Infinity" minWidth="-Infinity" prefHeight="469.0"
      prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.40" xmlns:fx="http://javafx.com/fxml/1"&gt;
      &lt;center&gt;
  
          &lt;GridPane fx:id="gridpane" xmlns:fx="http://javafx.com/fxml"
              alignment="center" hgap="10" vgap="10"&gt;
  
              &lt;Text text="Welcome" GridPane.columnIndex="0" GridPane.rowIndex="0"
                  GridPane.columnSpan="2" /&gt;
  
              &lt;Label text="Terminal" GridPane.columnIndex="0"
                  GridPane.rowIndex="1"&gt;
                  &lt;font&gt;
                      &lt;Font size="15.0" /&gt;
                  &lt;/font&gt;
              &lt;/Label&gt;
  
              &lt;TextField fx:id="txtuser" GridPane.columnIndex="1"
                  GridPane.rowIndex="1" /&gt;
  
              &lt;Label text="Password" GridPane.columnIndex="0"
                  GridPane.rowIndex="2"&gt;
                  &lt;font&gt;
                      &lt;Font size="15.0" /&gt;
                  &lt;/font&gt;
              &lt;/Label&gt;
              &lt;PasswordField fx:id="txtaun" GridPane.columnIndex="1"
                  GridPane.rowIndex="2" /&gt;
              &lt;HBox spacing="10" alignment="bottom_right"
                  GridPane.columnIndex="1" GridPane.rowIndex="4"&gt;
                  &lt;Button fx:id="loginbtn" onAction="#handleLoginAction" text="LOGIN" /&gt;
              &lt;/HBox&gt;
              &lt;Label fx:id="message" GridPane.columnIndex="1"
                  GridPane.rowIndex="6" /&gt;
              &lt;Label fx:id="actiontarget" GridPane.columnIndex="1"
                  GridPane.rowIndex="7" /&gt;
          &lt;/GridPane&gt;
      &lt;/center&gt;
      &lt;top&gt;
          &lt;Label id="Header" minWidth="400.0" prefHeight="81.0" prefWidth="174.0"
              text="Sim Manager" BorderPane.alignment="CENTER"&gt;
              &lt;font&gt;
                  &lt;Font size="50.0" /&gt;
              &lt;/font&gt;
          &lt;/Label&gt;
      &lt;/top&gt;
      &lt;bottom&gt;
          &lt;Label prefHeight="69.0" prefWidth="126.0" text="Powered by CIAR"
              textFill="#20209e" BorderPane.alignment="bottom_right" /&gt;
      &lt;/bottom&gt; 
  &lt;/BorderPane&gt;
  </code></pre>
  
  <p>Please let me know if any information is needed.</p>