When selecting a reg in a column with a checkbox, the whole row of blue is marked and when the row of blue is marked, it can not be deleted because it does not recognize the Boolean value of the checkbox and as it does not recognize it, it can not be eliminated this is the image
this is the code to eliminate public void leeRifIdentif(){
String RIF;
int cont=0;
TableModel model = datalistado.getModel();
for(int i = 0; i < model.getRowCount(); i++){
if((Boolean)model.getValueAt(i, 0) == true){
RIF=((String)model.getValueAt(i, 1));
cont++;
try{
ps =cn.prepareStatement("DELETE FROM cliente WHERE rif=?");
String rif = String.valueOf(RIF);
ps.setString(1,rif);
ps.executeUpdate();
MostrarDatos(false);
VaciarCampos();
when evaluating the condition to know if it is true as it is marked the row I take it false
}catch(Exception e){
System.out.println(e.getMessage());
}
}
}
if(cont == model.getRowCount()){
CboCampo.setSelected(false);
}
}