aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes make uneditable cell a different color Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "make uneditable cell a different color" Watch "make uneditable cell a different color" New topic
Author

make uneditable cell a different color

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 is the component in the cell in 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: make uneditable cell a different color
 
Similar Threads
wants to display Cell color in a table based on source value
cell renderer trouble
How to give different foreground color for the same cell in JTable?
getting focus in one cell in JTable
How to make that interactive jpeg map ?