Hi,
I am trying to implement the following behaviour on a JTable: when mouse is
over a row, the row's background color should change.
I am using custom renderers for all the columns, so i am changing the color
of background in these controls manually.
The point i'm stuck is: i need a way to call getTableCellRendererComponent
manually, so that i can call this method for all the cells in the row, which
is under the mouse pointer. My custom renderers, check if the current
rendered row is under mouse, and renders a different bg color if so.
So far, only way i've found is to call editCellAt() for all cells in row,
which in fact returns my custom renderer again. This is the only way i could
cause a call to getTableCellRendererComponent in the table. I think i can
make it work this way, but i did not like it.
Is there any way for calling getTableCellRendererComponent for a spesific
cell in jTable to update only that cell?
Best Regards
Seref Arikan
Seref Arikan - 13 Feb 2004 16:32 GMT
Ok,
i have to confess, i totally forgot about fireTableXyzUpdated methods in
abstact table model, which is exactly what i want