Validation of JTextField to accept negative and positive values
843805Sep 25 2006 — edited Sep 26 2006Hi,
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 ?