Hi.
I got a JTextField
, and to that field I have added a Keylistener
. Inside the keyPressed
method, I ask the method to print (System.out.println
) whats inside the JTextField
.. If I hit a letter, it seems as the Keylistener
receives this key-hit before the JTextField
is updated.. I have to hit two letters to see the first one..
All I need to do is to make every letter upper-case as they are inputted.. This I am trying to do by listening to every key (I also listen to the ENTER key for other reasons) and then do a textfield.setText(textfield.getText().toUpperCase());