I want to change the color of the whole row("which is containing different data types in different cells") depending upon the value of one column. Have any idea?????
Please help!!!!!!!!!!!!!!!!!!!!!!!1
chankya
0
Newbie Poster
Recommended Answers
Jump to PostCreate your own custom TableCellRenderer, then set the background color of whatever the component is that you're returning for rendering.
Component c = whatever your component is (rowIndex %2 == 0) ? c.setBackground(Color.blue) : c.setBackground(Color.white);
If you do this, you'll also have to control the highlighting of …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.