JList.getSelectedValues() returns values sorted by increasing index order. Is there a way to return the values in the order they were selected? Or do I have to write my own listener and build the array? Seemed like a JTree returns multiple selections in the order they were selected, is that true?
For example if list contains:
And 5 is selected first, then 3, and then 1. I want the array to be [5,3,1], and not [1,3,5].