I go through the whole table obtaining the values of the selected checkboxes the problem is that if it brings all the values except the last one selected:
in this case you should print the values from 3 to 11 but do not print the latter: This is the code that gets jtable values
String valor = "";
int cantFilas = tableRamos.getRowCount();
int i = 0;
for ( i = 0; i < cantFilas; i++) {
if (tableRamos.getValueAt(i, 0).equals(true)) {
valor = tableRamos.getValueAt(i, 1).toString(); //fila seleccionada, y valor guardado en la variable "valor"
System.out.println(valor);
//agregarRamos(valor, getaPersist());
}
}