-
JTable Row Rendering
Hello
I am using a JTable, and would like to render rows instead of columns, I have implemented TableMode and obvioulsy there is a getColumnClass, which can be used to create default rendering with types such as Boolean etc..
But this only applied to Columns, is there anyway of getting the same kind of functionality with Rows?! i.e. getRowClass
Cheers
Andy
-
What does Class getColumnClass(int column) return if a column has multiple rows? :confused: I would use Object getValueAt(int row, int col).
-
getClass
Well the GetClass(columnindex) returns the class of the column, so the tablecan prepare a renderer for it, there for if you return Boolean it will expect an Object of type Boolean when it calls getValueAt(column, Row), so if you don't return an Boolean it will throw a class cast exception.
How ever, if you simpley return Object.class from the get class then it will expect an Object from get ValueAt which is fine, but then it simply calls toString() on the object and therefore does not have the desired effect!
Hope that makes sense?!
Andy