I have placed a checkbox
in a JTable . The problem is that when I click on the test button ( btnPrueba
), a validation message "marque"
appears. How would I validate correctly ?:
protected void btnPruebaActionPerformed(ActionEvent e) {
for(int i = 0; i < tbDocNoUbicado.getRowCount(); i++){
Boolean checked = Boolean.valueOf((boolean) tbDocNoUbicado.getValueAt(i, 13));
String col = (String) tbDocNoUbicado.getValueAt(i, 0);
if(checked == true){
System.out.println(col);
}
else{
JOptionPane.showMessageDialog(null, "marque");
return;
}
}
}