|
JTable Gridline in selected row
I am trying to set up a JTable so that it looks like a JList so that I can use different colours in cells and have everything nicely arranged in columns.
I do not want any grid lines showing so I have table.setShowGrid(false);
My problem is that when I select a row I want it highlighted but I get a white vertical gridline showing in the selected line. Please help me get rid of this line. I want a solid block of background colour across the row.
The code which handles the highlighting is an implemenation of TableCellRenderer in
public Component getTableCellRendererComponent(
.............................
if(isSelected){
setBackground(Color.getHSBColor(0.6F,0.2F,0.9F));
}else {
setBackground(Color.white);
}
Last edited by arubin : 07-11-2007 at 11:20 AM.
|