|
-
February 22nd, 1999, 05:21 AM
#1
problem Jlist & addElement
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|