Collection list = Collections.list(listModel.elements());
Collections.sort(list);
listModel.clear();
for(Object o:list){ listModel.addElement(o); }
something like that.
You can also extract an
Array
and sort it via a
Comparator[
^].
JList should update view automatically.
Have fun!