how to change color of selected row in jtable

hi to all

i am using this code to change color of selected row but it color all cells

TableCellRenderer table=DisplayTable.getCellRenderer(selectedRow,2);

Component c=DisplayTable.prepareRenderer(table,selectedRow,2);

if(model.getValueAt(selectedRow,6)!=null)

c.setForeground(Color.red);

[324 byte] By [socmaga] at [2007-11-27 9:43:56]
# 1
http://forum.java.sun.com/thread.jspa?threadID=5191564&messageID=9751203#9751203
PhHeina at 2007-7-12 23:49:59 > top of Java-index,Desktop,Core GUI APIs...