How to save the selected row of a JTable in DB?

0

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());
    
asked by anonymous 22.12.2014 / 13:21

0 answers