java tablemodel_java tableModel.removeRow()方法执行

我在程序中写了一段代码:System.out.println("Browcount="+tableModel.getRowCount());System.out.println("BtableValue="+tableModel.getDataVector());//初始化输出表格for(inti=0...

我在程序中写了一段代码:

System.out.println("B row count="+tableModel.getRowCount());

System.out.println("B table Value="+tableModel.getDataVector());

//初始化输出表格

for(int i=0;i

tableModel.removeRow(i);

System.out.println("RemoveRow index="+i);

}

System.out.println("A row count="+tableModel.getRowCount());

System.out.println("A table Value="+tableModel.getDataVector());

目的就是清空tableModel中所有的数据,下面是执行完成后输出的数据:

B row count=5

B table Value=[[0, 检测结果, InspectResult, 整型], [1, 斑点分析, ResultDoc.Err:7, 字符串], [2, 斑点分析, Reserve:7, 整型], [1, 斑点分析, ResultDoc.Err:7, 字符串], [0, 检测结果, InspectResult, 整型]]

RemoveRow index=0

RemoveRow index=1

RemoveRow index=2

A row count=2

A table Value=[[1, 斑点分析, ResultDoc.Err:7, 字符串], [1, 斑点分析, ResultDoc.Err:7, 字符串]]

object=2 斑点分析 Reserve:7

请教高手,为什么执行removeRow()方法后tableModel中还有数据存在?

展开

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值