Daan Heuvelbeuk wrote:... when I know what type there is in the column
Daan Heuvelbeuk wrote:What benefit would I get when I know what type there is in the column?
Paul Clapham wrote:The code which displays the cells will then display them in a suitable way for that type, instead of just using the toString() method of the cell's object. This is particularly helpful if the cells are editable, because then the code which edits your input will ensure that only suitable data is entered. For example it will only allow you to enter digits for an Integer column.
Daan Heuvelbeuk wrote:Thanks Paul. But I still have the problem that what I tried resulted in Eclipse complaining about "Type mismatch: cannot convert from String to Class<?>", or "Type mismatch: cannot convert from Date to Class<?>", or ""Type mismatch: cannot convert from Time to Class<?>". So in the end I had to go back to the old situation.
Paul Clapham wrote:
Even after Darryl posted the correct way to return a Class object?