title: Listen to changes in TextField defined in FXML
body: <p>I am writing a simpe login GUI that is composed by a GridPane, which is the main container, then a TextField which takes in the user nickname and finally a login Button.</p>
  <p>I wrote the GUI structure in FXML combined with CSS.</p>
  <p>What I wanted to do was keeping the login Button disabled until the user actually wrote something in the TextField. I could only find an answer related to this but I wanted to know what was the best method to put this Listener in the FXML code itself so that I could get a cleaner code in the FXML controller.</p>
  <p>I tried to use the method onKeyTyped but that didn't do the work cause I get no response whenever I'm typing in the TextField.</p>
  <p>This is my FXML code</p>
  <pre><code>&lt;TextField fx:id=&quot;usernameTextField&quot;
             promptText=&quot;Username&quot;
             onKeyTyped=&quot;#userTyped&quot;
             stylesheets=&quot;@loginStyle.css&quot;&gt;
  </code></pre>
  <p>What's the best method to achieve this?</p>