网上说是由于线程冲突,我自己搞了一个model
/*
* RunInfoListModel.java
*
* Created on 2007年11月29日, 上午9:50
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/package tbank.common;import javax.swing.DefaultListModel;/**
*
* @author user
*/
public class RunInfoListModel extends DefaultListModel{
public synchronized Object getElementAt(int index) {
int iSize = getSize()-1;
if (iSize==0){return null;}
if(index>=iSize){
index=iSize;
}
return elementAt(index);
}
public synchronized void add(Object o) { addElement(o); }
public synchronized void removeAlls(){
clear();
}
}
---------------------------------------------
但还是不行
/*
* RunInfoListModel.java
*
* Created on 2007年11月29日, 上午9:50
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/package tbank.common;import javax.swing.DefaultListModel;/**
*
* @author user
*/
public class RunInfoListModel extends DefaultListModel{
public synchronized Object getElementAt(int index) {
int iSize = getSize()-1;
if (iSize==0){return null;}
if(index>=iSize){
index=iSize;
}
return elementAt(index);
}
public synchronized void add(Object o) { addElement(o); }
public synchronized void removeAlls(){
clear();
}
}
---------------------------------------------
但还是不行
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货