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());
I know its not so popular to answer your own question.. but I guess I found the solution.. Instead of doing all the upper-casing in the keyPressed method, I do it in the keyReleased 🙂