I want to detect when the string in a Text Field changes(both when chars are added and when chars are backspaced), to do so I tried using the onKeyTyped function
SearchTF.onKeyTypedProperty(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
System.out.println("Hello World!");
}
});
This code does not work
So here are my three question
- Why does this not work
- How can I get this working
- Is there a better way to detect when a string in a Text Field changes? (As mentioned in the first line)