-
Enhancement
-
Resolution: Duplicate
-
P4
-
None
-
1.2.0
-
generic
-
generic
Name: rk38400 Date: 11/10/98
In Swing 1.1 Beta3
The DefaultListModel class is missing API to set or append the internal elements of the model with an array of elements.
In the current implementation, one is forced to set each element one by one using add(), set() or similar methods.
Each of these call results in a content changed or interval added event.
For large models, this could cause unneeded hit in performance as well as superfluous redraws.
I presume that this problem is also common to other default model implementations but I didn't
check (DefaultTreeModel, DefaultTableModel, ...).
Also, it would have been easy to implement the missing API ourselve by subclassing if the vector containing the elements (delegate)
had been made protected. Unfortunately, it is private...
(Review ID: 42400)
======================================================================
- duplicates
-
JDK-4121430 JList DefaultListModel is slow if adding lots of items
-
- Closed
-