Reputation: 639
I want to be able to do two things:
I do not need to detect selection change or anything. Could someone tell me how to do that? What methods would help etc? In case the title wasn't read, this is regarding DefaultTableModel
in JTables
.
Upvotes: 0
Views: 1123
Reputation: 324098
set colors of rows based on index,
Table Row Rendering might give you some ideas.
be able to set color of columns also based on something
You can provide a custom render for any column. Then you can add you logic to color the column based on something. Read the JTable API and follow the link to the Swing tutorial on How to Use Table
and you will find a section on creating a custom renderer.
Upvotes: 1