テーブルモデルに 3 行あります。各行には 9 列 (o-8) が含まれています。すべての行の最後の列を更新したいのですが、1 行目の最後の列しか更新できません。
` SAVE=new JButton("SAVE");
SAVE.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
String Status=null ;
DbUtility ViewAbsenties=new DbUtility();
ViewAbsenties. loadDriver();
ViewAbsenties.connect();
TableModel tm;
tm = table3.getModel();
int i = table3.getRowCount();
System.out.println("row count"+i);
try{
while(i!=0){
Status =(String) tm.getValueAt(0,8);
String Employeeid = (String) tm.getValueAt(i,0);
System.out.println("Status: " + Status);
System.out.println("Employeeid: " + Employeeid);
ViewAbsenties.executeUpdateQuery2(Status,Employeeid);
System.out.println("i"+i);
i=i-1;
}}
catch (Exception e5) {
}
});