Posted By:
Effi_Olivkovich
Posted On:
Wednesday, July 4, 2001 03:02 AM
I'm Extending a JTable. I created a cell renderer. When I'm trying to attach the renderer to a column using the following line: TableColumnModel tblColMdl = this.getColumnModel(); tblColMdl.getColumncolIndex).setCellRenderer(new CurrencyRenderer()); the table does not use this cell renderer. I tried the following code: this.setDefaultRenderer(Double.class, new CurrencyRenderer()); and it worked. I need to attach a renderer for each individual column, and not for a group of columns. can anyone tell me why the first set of code does not work?
More>>
I'm Extending a JTable.
I created a cell renderer.
When I'm trying to attach the renderer
to a column using the following line:
TableColumnModel tblColMdl = this.getColumnModel();
tblColMdl.getColumncolIndex).setCellRenderer(new CurrencyRenderer());
the table does not use this cell renderer.
I tried the following code:
this.setDefaultRenderer(Double.class, new CurrencyRenderer());
and it worked.
I need to attach a renderer for each individual column, and not for a group of columns.
can anyone tell me why the first set of code does not work?
<<Less