DefaultTableCellRenderer cellRender = new DefaultTableCellRenderer();
for(int i = 0; i < tblPackage.getRowCount(); i++)
{
if("ACTIVE".equals(tblPackage.getModel().getValueAt(i, 3).toString()))
{
cellRender.setForeground(Color.GREEN);
}
}
There's 4 columns in my table...and if the 4th columns of the data is equal to "ACTIVE" word, it will become to greeen color...how can I do that?? Is it got any problem with my logic??