I have a JTable
that populates the database, where I can select multiple rows at the same time with the Boolean field that was added. I need to, when I click the "burn" button of my form
, the lines that were selected in JTable
to be written to the database are captured.
I have the following code:
int id= Integer.parseInt((String)txtCidadeAtendida.getValueAt(0, 0));
String cidade = (String) txtCidadeAtendida.getValueAt(0, 1);
pst.setString(3, (String)txtCidadeAtendida.getSelectedRow());