Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

An Eventful CellRenderer

843804Mar 8 2005 — edited Mar 9 2005
Ladies and Gents,

Is it possible to react differently to fireTableDataChanged() and fireTableCellUpdated(i, ii) in the CellRenderer ?

To elaborate:

I have a jTable with a custom data model and a custom renderer.

Now anytime a new row is added, I call fireTableDataChanged();
Similarly, anytime data is updated, I call fireTableCellUpdated(i, ii).

I can see the renderer noticing both of these events.

However, I have to be able to react differently to these events.
When the new row is added, I would like to change the foreground color of the entire row to say red. However, when there is an update, I just want to change the foreground of the particular cell containing the updated data.

Is this possible? If so, any ideas, links ...

Cheers
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 6 2005
Added on Mar 8 2005
3 comments
46 views