Add action event handler to text field java fx
<p>I have a Textfield node as such in my java fx code:</p>

<pre><code>TextField Name= new TextField();
</code></pre>

<p>I understand how to fire code if one clicks on a button by adding an event handler like so:</p>

<pre><code>Button getName= new Button("Save");

getName.setOnAction(new EventHandler&lt;ActionEvent&gt;() {
    public void handle(ActionEvent args) {
       System.out.println("You clicked me!"):
    }
});
</code></pre>

<p>Could I add the same code to my <strong>textField</strong> node so when one clicks on the text field, it fires a bunch of code? Or how do you do this?</p>