wood burning stoves 2.0*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Changing color in particular row" Watch "Changing color in particular row" New topic
Author

Changing color in particular row

Andy Wong
Greenhorn

Joined: Jun 13, 2002
Posts: 3
Guys,
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.
Regards,
Rene Liebmann
Ranch Hand

Joined: May 02, 2002
Posts: 196
Hi,
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.
Bye
Rene
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing color in particular row
 
Similar Threads
table row selection in Netscape
JTable
changing color of one row dynamically
How to change the color of the row(JTable) when mouse move over it?
Setting focus to a table row