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!

reading integers/etc. from a JTextField

843805May 4 2007 — edited May 4 2007
Hello, I am just wondering if there is a way to read an integer or other data type besides a String from a JTextField? I tried to look through the methods of a JTextField and getText() is the only one I am seeing that does anything close to what I am trying to do. I have all of my data set to String's so that I can read them from a JTextField, but I would like to treat the integers as integers, and floats as floats, etc. Is there a way to read other data types from a JTextField? Thanks,
dub stylee
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 1 2007
Added on May 4 2007
1 comment
68 views