Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

colour a cell based on value input using the CellRenderer?  RSS feed

 
Joezy Whzy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1103
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!