I tried to make add/remove items in a JList after the JList object constructed,

so i use DefaultListModel in my code, like beneath:



........

DefaultListModel newListModel = new DefaultListModel();

for(int i =0;i<sum;i++) {

newListModel.addElement(String demoString);

System.out.println(i);

}

list.setModel(newListModel);

........


but when the items is more than 500 it became very very slowly.


I'll appreciate if any body can give me the idea, how to overcome the

problem.


thanks


Jiang Pet