File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes cell renderer trouble Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "cell renderer trouble" Watch "cell renderer trouble" New topic
Author

cell renderer trouble

David Shepherd
Ranch Hand

Joined: Mar 02, 2001
Posts: 35
I have a JTable and I want to make a cell a different color depending on the value in one of the other columns of the same row. Basically, set the color of cells, on a cell by cell basis.
I have tried to create a custom table cell renderer that will change the background color if the component in the cell is not editable but I have not had much luck. Am I on the right track?
Can someone please give me some guidance. It can't be that hard but it's killing me.
Thank you.
Ana Mihailescu
Greenhorn

Joined: Apr 26, 2001
Posts: 29
Here you can find a lot of good examples regarding JTables:
http://www2.gol.com/users/tame/swing/examples/SwingExamples.html
good luck !
mick barry
Greenhorn

Joined: Apr 30, 2001
Posts: 16
If you want to post the relevant parts of your code I can have a look at it for you.

-------------------------<BR>http://www.objects.com.au
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cell renderer trouble