Article View: cn.bbs.comp.lang.java
Article #20312��DefaultTableModel��һ�ʣ���
From: ����
Date: Mon, 22 Dec 2003 08:16
Date: Mon, 22 Dec 2003 08:16
24 lines
1841 bytes
1841 bytes
�������и�����ֵ����⣺
����DefaultTableModel model=new DefaultTableModel();
int rowCount=model.getRowCount();
System.out.println("current rows is"+rowCount);
for(int i=0; i<rowCount-1; i++){
model.removeRow(i);
}
����һ�����У�rowCount=0ʱ��û������
���ǵڶ���ʱ��Ҳ����rowCount=1001ʱ���ҵ������ô�ࣩ��
���?
�� ArrayIndexOutOfBoundsException 501>500������
��ְ�������rowCount=1001����ô��˵�������Ч��row�أ�
�Ҽ������Ϻָ��
--
[34m�������ᶨ���������˵����[m
[5;36m����һ�У������ܿ˷�һ�д��[m
[32m������������ף��ɱ����ɱ�[m[5;32m����[m
[m[1;32m�� ��Դ:��Ʈ��ˮ�Ƽ� Freecity.dhs.org��[FROM: not][m
Technical Details
Message-ID:
<49k0f7$9aR@Freecity.dhs.org>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-05!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!167.206.3.103.MISMATCH!news3.optonline.net!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!FreecityShow Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: f6cb0,f99c72817cdf1268,start X-Google-Attributes: gidf6cb0,public X-Google-ArrivalTime: 2003-12-22 03:05:46 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-05!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!167.206.3.103.MISMATCH!news3.optonline.net!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!Freecity From: not.bbs@Freecity.dhs.org (����) Newsgroups: cn.bbs.comp.lang.java Subject: ��DefaultTableModel��һ�ʣ��� Date: 22 Dec 2003 08:16:49 GMT Organization: Ʈ��ˮ�Ƽ� Message-ID: <49k0f7$9aR@Freecity.dhs.org> Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 8bit X-Filename: Java/M.1072080823.A