Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is there a getchar() equivalent in Java for JTextFields?

843807Nov 16 2009 — edited Nov 18 2009
Hi,

I would like to know if there is a way to fetch characters from a JTextField that is similar to getchar() in C?

I have an action event listener on my JTextField but I have not found a way to get the text other than a full line with the getText() method.
What I would like to do is to push the Characters on a stack as they are entered in the text field.

Edited by: Red_herring on Nov 16, 2009 7:18 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 16 2009
Added on Nov 16 2009
25 comments
1,566 views