This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JTable Cell Selection color Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable Cell Selection color" Watch "JTable Cell Selection color" New topic

JTable Cell Selection color

Sebastiaan Kortleven
Ranch Hand

Joined: Mar 12, 2004
Posts: 81
Hi there,
When selecting a row in a JTable, that rows background color turns blue (or whatever you want it to be) while the current selected cells colors stays the same (white background, black foreground).. how can i change this?
It's because I have a lot of data in different tables. A user can select which columns he wants to see and which he doesn't... but when only selecting 1 column, you can't see which row you just selected...
Sebastiaan Kortleven
Ranch Hand

Joined: Mar 12, 2004
Posts: 81
sorry.. got it...
I'm using cellrenderers for each of the components in the jtable..
I agree. Here's the link:
subject: JTable Cell Selection color
jQuery in Action, 3rd edition