title: observablelist update issue in javaFX
body: <p>I am creating a universal chat application using JavaFX. I created a listView using SceneBuilder and modeled it with <code>ObservableList</code> like below:</p>
  
  <pre><code>public static ObservableList&lt;String&gt;  members = FXCollections.observableArrayList();
  
  @FXML public static Button send;
  @FXML static  ListView names;
  @FXML static HTMLEditor outmsg;
  @FXML static HTMLEditor showBox;
  
  static void updateRemove(String newuser) {
  
   //   showBox.setHtmlText(showBox.getHtmlText()+newuser+"&lt;br&gt;  has left room");
      System.out.println(newuser+"has left room");
      members.remove(newuser);
      System.out.println("helloji update remove");
  
  
  }
  @FXML public void sendAction(ActionEvent event)
  {
  
  
   LoginController.instance.c.sendMessage(outmsg.getHtmlText());
  
  
  }
  public  static void updateList(String name)
  {
     // showBox.setHtmlText(showBox.getHtmlText()+"&lt;br&gt; new user entered in room");
      System.out.println("new user enterd"+name);
      System.out.println("beginning update list");
      members.add(name);
      System.out.println(members);
      System.out.println("add user request fullfilled");
  
  
  }
   public  static void initList(Vector&lt;String&gt; name)
  {
      System.out.println("list initializing");
      members.setAll(name);
        System.out.println(members);
      System.out.println("list initialized");
  
      System.out.println("public room created");
  
  
  }
  public static void showMessage(String msg)
  {
  
     // showBox.setHtmlText(showBox.getHtmlText()+""+msg);
          System.out.println("showing msg   "+msg);
  }
  
  @Override
  public void initialize(URL url, ResourceBundle rb) {
      // TODO
  
  
  
       names.setItems(members);
      // showBox.setHtmlText(showBox.getHtmlText()+"&lt;br&gt; welcome "+Client.username);
           System.out.println("welcome  "+Client.username);
  
       System.out.println(names.getItems());
  
  }    
  </code></pre>
  
  <p>}</p>
  
  <p>but when its <code>updateRemove()</code> method is called, exception is thrown:</p>
  
  <pre><code>java.lang.IllegalStateException: Not on FX application thread; currentThread = Thread-4
      at com.sun.javafx.tk.Toolkit.checkFxUserThread(Unknown Source)
      at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(Unknown Source)
      at javafx.scene.Parent$1.onProposedChange(Unknown Source)
      at com.sun.javafx.collections.VetoableObservableList.setAll(Unknown Source)
      at com.sun.javafx.collections.ObservableListWrapper.setAll(Unknown Source)
      at com.sun.javafx.scene.control.skin.LabeledSkinBase.updateChildren(Unknown Source)
      at com.sun.javafx.scene.control.skin.LabeledSkinBase.handleControlPropertyChanged(Unknown Source)
      at com.sun.javafx.scene.control.skin.SkinBase$4.changed(Unknown Source)
      at javafx.beans.value.WeakChangeListener.changed(Unknown Source)
      at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(Unknown Source)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
      at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(Unknown Source)
      at javafx.beans.property.StringPropertyBase.markInvalid(Unknown Source)
      at javafx.beans.property.StringPropertyBase.set(Unknown Source)
      at javafx.beans.property.StringPropertyBase.set(Unknown Source)
      at javafx.beans.property.StringProperty.setValue(Unknown Source)
      at javafx.scene.control.Labeled.setText(Unknown Source)
      at com.sun.javafx.scene.control.skin.ListViewSkin$12.updateItem(Unknown Source)
      at javafx.scene.control.ListCell.updateItem(Unknown Source)
      at javafx.scene.control.ListCell.access$000(Unknown Source)
      at javafx.scene.control.ListCell$5.onChanged(Unknown Source)
      at com.sun.javafx.scene.control.WeakListChangeListener.onChanged(Unknown Source)
      at com.sun.javafx.collections.ObservableListWrapper.callObservers(Unknown Source)
      at com.sun.javafx.collections.ObservableListWrapper.remove(Unknown Source)
      at com.sun.javafx.collections.ObservableListWrapper.remove(Unknown Source)
      at truechatter.RoomController.updateRemove(RoomController.java:45)
      at truechatter.Client.run(Client.java:78)
  </code></pre>
  
  <p>while <code>initList()</code> method works properly. Why?</p>