public void tableChanged(TableModelEvent e){ //大致上这样
int row=e.getFirstRow();
int column=e.getColumn();
int x=((Integer)(yt.getValueAt(row,2))).intValue(); //yt 是你的JTable的实例变量
int y=((Integer)(yt.getValueAt(row,3))).intValue();
int total=x+y;
.....
.....
}
能帮忙举个例子吗
int row=e.getFirstRow();
int column=e.getColumn();
int x=((Integer)(yt.getValueAt(row,2))).intValue(); //yt 是你的JTable的实例变量
int y=((Integer)(yt.getValueAt(row,3))).intValue();
int total=x+y;
.....
.....
}
能帮忙举个例子吗
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货