aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes colour a cell based on value input using the CellRenderer? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "colour a cell based on value input using the CellRenderer?" Watch "colour a cell based on value input using the CellRenderer?" New topic
Author

colour a cell based on value input using the CellRenderer?

Joezy Whzy
Greenhorn

Joined: Mar 25, 2013
Posts: 1
Hi, basically I am using JTables and I have a row of data. I have a user ID column, and a status column (along with a bunch of other), what I want is when the 'status' column is edited and "Accepted" is typed, the user ID should turn green. If "Rejected" is typed the user ID should turn red. This has to I guess happen dynamically, as once its opened and either accepted/rejected are typed then enter is pressed it should change.

I have tried a few methods and code from online but I just cannot do it. Can someone please guide me through the process!

THanks.
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1075
    
  10

Hi,
Welcome to the Ranch!

Did you check the tutorial page ?
If you scroll down in that page, it has an example which I think fits your case.


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: colour a cell based on value input using the CellRenderer?
 
Similar Threads
Uniqueconstraints solution
JDBC Question
Regarding Staus Bar
Hibernate mapping to a view
hide the column in the table datagrid