Hi
sorry for my english
first, create new class
<code>
class ColorRowTable
extends JTable {
private int[] colorRows=new int[0];//table with numbers of our
colorful rows
public Color rowColor=Color.red; //you can set your color
/*this method is always invoked when ui is updated*/
public Component prepareRenderer(TableCellRenderer renderer, int
rowIndex, int vColIndex) {
Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
if (checkRow(rowIndex) && !isCellSelected(rowIndex, vColIndex)) {
c.setBackground(rowColor);
}
else {
c.setBackground(getBackground());
}
return c;
}
/*compare index of actual row with rows to be painted*/
private boolean checkRow(int index){
boolean result=false;
for(int i=0; i<this.colorRows.length && !result; i++){
if(this.colorRows[i]==index){
result = true;
}
}
return result;
}
/*sets rows to be painted*/
public void setColorRows(int[] rowNumbers){
colorRows=new int[rowNumbers.length];
for(int i=0; i<rowNumbers.length; i++){
colorRows[i]=rowNumbers[i];
}
}
/*you can add, remove etc numbers of colorful rows*/
}
</code>
for example, in main code
<code>
ColorRowTable mytable=new ColorRowTable(); //
/*...do sth with this table...*/
/*if you have numbers of new rows*/
int[] index={/*for example*/1, 2, 5};
mytable.setColorRows(index);
mytable.rowColor=Color.....
mytable.updateUI();
</code>
sorry, if I missed sth

Signature
Szerszu
szerszu1982CUT_IT_PLEASE@CUT_IT_PLEASEo2.pl