我在tablemodel中有3行。每行包含9列(o-8)。我想更新每一行的最后一列......但现在我只能更新第一行最后一列..请帮助..`
` 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) {
}
});