I’m Building a Client/server Desktop Application.
I wanted to know if it is possible to make a JTable Column Changes its color according to specific values from the database (oracle).
- Red= “Refused”.
- Green=”Accepted”.
- yellow=”Quarantine”.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use a custom column renderer for this:
You can use that renderer like this (example for a single column):
Once you have the color changing code you can create a listener which listens for the value changes to the table model and by checking the changes you can apply the colors you want to specific columns.