title: Enabling/Disabling buttons in JavaFX
body: <p>how do you disable buttons under a certain condition? For example, i have many text fields and buttons, when those text fields are empty one of my buttons should be disabled. i already have this code.</p>
  
  <pre><code>if(txtID.getText().isEmpty()&amp;&amp;txtG.getText().isEmpty()
              &amp;&amp;txtBP.getText().isEmpty()&amp;&amp;txtD.getText().isEmpty()
              &amp;&amp;txtSP.getText().isEmpty()&amp;&amp;txtCons.getText().isEmpty()){
         btnAdd.setDisable(true);
         }
  else{
  btnAdd.setDisable(false);
  }
  </code></pre>
  
  <p>is there an easier way to do this? Also if i add text into those areas shouldnt the button be re enable its self? </p>