This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I want to get the value of a text field after every key is typed. So, say the text field already has
hello
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?
Please help.
thanks
Poorav Chaudhari
Rob Camick
Ranch Hand
Joined: Jun 13, 2009
Posts: 1788
2
posted
0
I want to get the value of a text field after every key is typed.