hi, I am having a problem with adding button on jTable for each data I get from the database.
here is what I get from database in SQLite
try{
String sql = "select ClassName as 'Class Name', NumberOfStudents as 'Number of Students' from ClassRooms";
pst=conn.prepareStatement(sql);
rs=pst.executeQuery();
Data_Table1.setModel(DbUtils.resultSetToTableModel(rs));
if(rs.next){
//code to add the button here.
}
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
} finally{
try{
rs.close();
pst.close();
}
catch(Exception e){
}
}
I am not understanding how to make the button code?