title: How to fire a Textfield listener in JavaFX?
body: <p>In Java, I'm trying to fire a Textfield listener.</p>
  
  <p>The only solution I've found is to use setText with a space:</p>
  
  <pre><code>txt.setText(" "); 
  </code></pre>
  
  <p>What is the correct way to do it?</p>
  
  <p>Details:</p>
  
  <pre><code>TextField txt = new TextField();
          txt.setPromptText("Search");
          txt.textProperty().addListener(new ChangeListener() {
              public void changed(ObservableValue observable, Object oldVal,Object newVal) {
                 //...to do
              }
          };
  txt.setText(" "); //Firing the listener
  </code></pre>