
23/05/2013, 17:57
|
| | Fecha de Ingreso: mayo-2013
Mensajes: 28
Antigüedad: 11 años, 9 meses Puntos: 0 | |
Respuesta: Cambiar color filas jtable Gracias chidiang pero aun no me funciona, te copio el codigo por si me equivoco en algo:
Código:
public class FormatoTablaColecciones extends DefaultTableCellRenderer{
public Component getTableCellRendererComponent (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column){
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
if(table.getValueAt(row, 1).equals("PRUEBA")){
this.setBackground(Color.red);
}
else{
return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
}
return this;
}
}
De esta forma me pinta todas las filas rojas... |