jQuery in Action, 3rd edition
The moose likes Swing / AWT / SWT and the fly likes Changing color in particular row Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Changing color in particular row" Watch "Changing color in particular row" New topic

Changing color in particular row

Andy Wong

Joined: Jun 13, 2002
Posts: 3
I would like to highlight (by changing color or font) in a particular row/cell (not column). How do I implement it? I have tried List Selection, but it is not the case; I just want change the appearance, not affect the users' selection. Please advise.
Rene Liebmann
Ranch Hand

Joined: May 02, 2002
Posts: 196
this topic was discussed many times before. Please use the search for finding something about it. I tried the keywords "Row Color".
Just a hint, you have to write your own TableCellRenderer. Mostly you can extend from DefaultTableCellRenderer. There you need to implement one function getTableCellRendererComponent.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Changing color in particular row
It's not a secret anymore!