title: JavaFX: Bound value cannot be set exception
body: <p>In my javafx application I have created a table view where I have some projects.  If the projects are there in the table view, then the delete button should be enabled, otherwise delete button should be disabled.</p>
  
  <p>Now the problem is that when I select the project and click the delete button it's throwing the following exception.</p>
  
  <p>How can I solve this?</p>
  
  <p>This is my tableview code.</p>
  
  <pre class="lang-java prettyprint-override"><code>tableViewProject.setOnMouseClicked(new EventHandler&lt;MouseEvent&gt;() {
      @Override
      public void handle(MouseEvent event) {
          Project selectedProject = tableViewProject.getSelectionModel().getSelectedItem();
          if (selectedProject != null) {
              currentProject = selectedProject;
              propertyChangeSupport.firePropertyChange("projectManagerController.projectIsSelected", null, selectedProject);
              btn_remove_project.setDisable(false);
          } else {
              btn_remove_project.setDisable(true);
          }
      }
  });
  </code></pre>
  
  <pre><code>Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: Button.disable : A bound value cannot be set.
  at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:140)
  at javafx.scene.Node.setDisable(Node.java:1543)
  at com.virtusa.tempo.server.ui.controllers.ProjectManagerController$3.handle(ProjectManagerController.java:131)
  at com.virtusa.tempo.server.ui.controllers.ProjectManagerController$3.handle(ProjectManagerController.java:124)
  at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
  at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
  at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
  at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
  at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
  at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
  at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
  at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
  at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
  at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
  at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
  at javafx.event.Event.fireEvent(Event.java:198)
  at javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3471)
  at javafx.scene.Scene$ClickGenerator.access$8100(Scene.java:3399)
  at javafx.scene.Scene$MouseHandler.process(Scene.java:3767)
  at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3486)
  at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
  at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2495)
  at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:350)
  at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:275)
  at java.security.AccessController.doPrivileged(Native Method)
  at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$350(GlassViewEventHandler.java:385)
  at com.sun.javafx.tk.quantum.GlassViewEventHandler$$Lambda$355/919089086.get(Unknown Source)
  at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:404)
  at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:384)
  at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
  at com.sun.glass.ui.View.notifyMouse(View.java:927)
  at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
  at com.sun.glass.ui.win.WinApplication.lambda$null$145(WinApplication.java:101)
  at com.sun.glass.ui.win.WinApplication$$Lambda$39/1633781598.run(Unknown Source)
  at java.lang.Thread.run(Thread.java:745)
  </code></pre>