> Apologies over, my problem is that, i want to change the color of a
> JTable cell which is selected. Selection can happen by mouse click or
> using arrow keys or tab key.
Different look-and-feels do this differently. You could change to a
different look-and-feel to see if it matches what you want.
You can subclass DefaultTableCellRenderer and get complete control. Your
JTable subclass should override
getCellRenderer(int row, int column)
or you may be able to use
setDefaultRenderer(Class columnClass, TableCellRenderer renderer)
on a straight JTable.
Andrew Thompson - 10 Dec 2007 11:49 GMT
>>...want to change the color of a
>> JTable cell which is selected. Selection can happen by mouse click or
>> using arrow keys or tab key.
>
>Different look-and-feels do this differently. You could change to a
>different look-and-feel to see if it matches what you want.
Have you checked it, for e.g.* using the system PLAF?
<http://www.physci.org/test/resize/>

Signature
Andrew Thompson
http://www.physci.org/
Chanchal - 10 Dec 2007 12:30 GMT
Hello Gentlemen,
My application is already using a look and feel. So changing the look
and feel is not an option. Anyway i have implemented it by creating a
custom cell renderer
Thanks agan, for the response
Chanchal