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!

Validation of JTextField to accept negative and positive values

843805Sep 25 2006 — edited Sep 26 2006
Hi,
I have a question. I have a jTable populated with the fieldname
in the first column and datatype in the second column.
I would like to place a JTextField component in the frame
depending on the data type. So, if a row is selected in the table, the
datatype of that fieldname is retrieved and depending on that data type
I want a JTextField to be displayed.
Now, if the data type is of Integer type, I want the JTextfield to
accepts Integers only(positive). I have created a class that extends JTextfield.
But, I want the text field to accept negative integers also. Can anyone please guide me ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 24 2006
Added on Sep 25 2006
3 comments
378 views