jTblRefe = new javax.swing.JTable(){public Component prepareRenderer
(TableCellRenderer renderer,int Index_row, int Index_col)
{
Component comp = super.prepareRenderer(renderer, Index_row, Index_col);
//even index, selected or not selected
if (Index_row % 2 == 0 ) {
comp.setBackground(new java.awt.Color(230,212,212));
}
else
{
comp.setBackground(Color.white);
}
return comp;
}
public boolean isCellEditable(int row,int column){
return false;
};
}
;
No comments:
Post a Comment