S
stroker_ace
Hi,
I am using a DefaultListModel instance to store the contents of a
JList.
The data I want to store in the list is (for implementation reasons)
stored in a TreeSet.
I suspect I may be missing something but I am suprised that there is no
bulk method for adding a whole collection to a DefaultListModel and I
have to use the addElement method to add each object to the
DefaultListModel.
Is there a more elegant method of achieving this?
I could extend DefaultListModel or write a routine to load the objects
but it seems so clumsy.
Cheers for any help.
Lawrie.
I am using a DefaultListModel instance to store the contents of a
JList.
The data I want to store in the list is (for implementation reasons)
stored in a TreeSet.
I suspect I may be missing something but I am suprised that there is no
bulk method for adding a whole collection to a DefaultListModel and I
have to use the addElement method to add each object to the
DefaultListModel.
Is there a more elegant method of achieving this?
I could extend DefaultListModel or write a routine to load the objects
but it seems so clumsy.
Cheers for any help.
Lawrie.