I want to get the value of a text field after every key is typed. So, say the text field already has
if i type '!' at the end, txtfield.getText() still gives me hello for the keyTyped event instead of hello! txtfield.getText() + event.getKeyChar() gives the correct value, but the problem with using this approach is that supposing I highlight the entire hello string and type something else like 'w' the above code will return hellow instead of w.
Why does it seem so difficult to get the value of a textfield after a keystroke?
posted 6 years ago
I want to get the value of a text field after every key is typed.