I have a JTable in which 4th column is editable but i want to make this column to accept only fixed length input means user should not be able to enter data more than what is fixed at execution time for that cell.
I am sorry.I was unaware of that policy.I was in hurry to get the answer.I never thought about the people who answer our queries and their precious time.Once again many thanks to people who answer our questions(Sometimes stupid) very patiently.
What should i do now? I did not get the answer either here or there? Please help me..
I tried to extend the DefaultCellEditor and created a FixedLengthTextField for the 4th column.But it is not working last editable column is accepting unlimited data.
Confused, is your problem that when cell goes to edit mode (in that moment) you want set fixed length of characters for your editor component (eg. JTextField) ?
Confused, is your problem that when cell goes to edit mode (in that moment) you want set fixed length of characters for your editor component (eg. JTextField) ?
Yes.I did this by overriding the isCellEditable method and setting the length of the editable cell there.
The code doesn't compile - it's missing the Main and PropertyStore classes. Post a simplified example that doesn't use those.
Thanks Ulf.Issue resolved.I used DefaultTableModel instead of AbstractTableModel.
Regards Sudhakar
Regards
Sudhakar
They worship nothing. They say it's because nothing lasts forever. Like this tiny ad: