I am fairly new to Swings. I have a JTable that has to do some validations before its data is saved:
(1) Each row of the Table allows values within a set range ex:0.5 to 100
(2) The cell may allow blank (later replaced before save with the lower range value)
All cell data will be Float data. My questions:
(a) Right now I am iterating through JTable cells and checking each row-wise cell to see if they are within range. What is the correct way to do such validations?
(b) JTable by default is not allowing me to leave the cell blank (the focus remains on the cell if I try to leave it blank). How can I allow blank cell entries?
(c) If user enters an invalid data (say a
String) in the cell that expects Float value, the text stays in the cell even though I clear the TableModel and repopulate the data. Any idea how to get over this?
[ October 07, 2004: Message edited by: Yash Sharma ]