I just wanna ask, how to detect a checked box on check boxes and how to update the table or delete the row of the checked box? i run this code and it exits the loop and didn't enter the if else statement :(
for(int i =table.getRowCount(); i>= 0 ; i++)
{
a = (String)table.getModel().getValueAt(i,1);
boolean getBool = (boolean)table.getModel().getValueAt(i, 6);
if(getBool)
{
JOptionPane.showMessageDialog(null,getBool);
String sql2 = "UPDATE room_record SET Book_status = 'Checked_In' WHERE
Room_Record_ID = '" + a + "'";
statement = conn.prepareStatement(sql2);
statement.executeUpdate(sql2);
((DefaultTableModel) table.getModel()).removeRow(i)
//model2.fireTableDataChanged();
JOptionPane.showMessageDialog(null,"done");
//System.out.println("true");
}
}