Hi, I have a JTable and all the Cells inside this table have JTextFiled. In addition, I have a method which have some logic and the output of this method will decide to color some cells inside this table. My problem is that I don't know how to color cells inside JTable. A sample of what I want to implement is mentioned in the attachment
My problem is that I don't know how to color cells inside JTable.
Read the API for JTable and follow the link to the tutorial on How to Use Tables, where you will find a section on renderers and editors. Go through that section carefully.
Note: I am using java 1.4
May I ask why you are using a version that reached its end-of-life on 30 October 2008?
There are no new questions, but there may be new answers.
Joined: Jun 13, 2013
My client is having a Java desktop application made with Java 1.4 and the client is not looking for update right now. However, I am good at Java but I don't have strong experience in the swing especially JTable.
Can you show me a small code to resolve my issue.
Appreciate your help.