public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
{
Component c = super.prepareRenderer(renderer, row, column);
c.setBackground(getBackground());
int modelRow = convertRowIndexToModel(row);
String Value = (String)getModel().getValueAt(modelRow, 7);
if (Value <= 30) c.setBackground(Color.GREEN);
return c;
}
This is my codes. In the if Statement I want to compare it if its greater than or equal to 30.
Aucun commentaire:
Enregistrer un commentaire