The DefaultListSelectionModel provides the method setSelectionInterval(int start, int end) to select an interval.

But how can I select multiple intervals?

Although I haven't used it, have you tried public void addSelectionInterval(int index0,int index1) in the DefaultListSelectionModel class.
Also have you set the selection mode to MULTIPLE_INTERVAL_SELECTION .

Although I haven't used it, have you tried public void addSelectionInterval(int index0,int index1) in the DefaultListSelectionModel class.].

yes, as a wrote in my thread...

Also have you set the selection mode to MULTIPLE_INTERVAL_SELECTION .

yes, i did. but this doesn't solve my problem

thank you anyway!

Any other suggestion?

forget my last post! you were right:

first:

setSelectionInterval(int start, int end);

then:
addSelectionInterval(int start, int end);

thank you!

Mark the thread as solved please ... I wanna increase my solved threads count :P

Comments
Well if he forgets to do that, I'll at least give you the rep =P
This question has already been answered. Start a new discussion instead.