Problem with JTextField
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Prashanth_Godey
Posted On:   Tuesday, October 2, 2001 11:43 AM

I have a jTextField with a KeyListener added to it, all I need to do is to capture the text in the textfield. When i tried to do getText() in the keyTyped(KeyEvent e) method, I get the text that was present before i hit the key.
I'm not able to get the text, including the key i typed last.... any suggestions??

Re: Problem with JTextField

Posted By:   hakan_geri  
Posted On:   Tuesday, October 2, 2001 01:16 PM

Hi,

Instead of overriding keyTyped method, override keyReleased method.
About | Sitemap | Contact