title: javafx capture textfield changes whenever the user type a character
body: <p>I'm fighting with a javafx textfield and i don't find how to call getText
  everytime the text is changed. i'm doing a search box, so i want whenever the user type a character in the textfield i will be able to put it in a string then search for the item in a treeItem .
   I tried this code but it doesn't work: </p>
  
  <pre><code>m_SearchTextField.textProperty().addListener(new ChangeListener&lt;String&gt;()  {
      @Override
      public void changed(ObservableValue&lt;? extends String&gt; observable,
                          String oldValue, String newValue) {
          String value = m_SearchTextField.getText();
      }
  });
  </code></pre>
  
  <p>however I find an answer in google that says we could use this </p>
  
  <pre><code>InputMethodListener
      public void caretPositionChanged(InputMethodEvent ev){}
      public void inputMethodTextChanged(InputMethodEvent ev){}
  </code></pre>
  
  <p>but i don't know how to use it really .. :(
  or this : scene builder : on input method text changed </p>
  
  <p>anyone knows how to use this functions ? I'll be grateful. thank you  </p>