public final void setOnAction (EventHandler<ActionEvent> value)

taken from field

The action handler associated with this text field, or null if no action handler is assigned. The action handler is normally called when the user types the ENTER key.