Galera, bom dia.
Estou colorindo algumas celulas de minha tabela depedendo da condição, porém tenho celulas distintas com condições distintas, mas ao analisar a primeira ele faz certinho e parece que está pulando a segunda condição. Segue meu código.
Component cell2 = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
Component cell = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
Object ref2 = table.getValueAt(row, jcoluna_setup); //coluna setup
Object ref = table.getValueAt(row, jcoluna_percentual);//coluna percentual
//SE A COLUNA SETUP FOR MAIOR QUE 5 EU VOU COLORIR APENAS AQUELA CELULA DAQUELA COLUNA
if (ref2 != null && Integer.parseInt(ref2.toString().substring(3, 5)) >= 05 && column == jcoluna_setup) {
cell2.setForeground(Color.WHITE);
cell2.setBackground(Color.red);
//SE A COLUNA PERCENTUAL FOR MENOR QUE 75 EU VOU COLORIR APENAS AQUELA CELULA DAQUELA COLUNA
if (ref != null && Integer.parseInt(ref.toString().substring(0, 2)) <= 75 && column == jcoluna_percentual) {
cell.setForeground(Color.WHITE);
cell.setBackground(Color.red);}
}
else {
cell2.setForeground(Color.BLACK);
cell2.setBackground(Color.WHITE);}
return this;
}
Valeu galera.