Hi there, this is my problem:
I have a ListModel and a ListDataListener.
When elements in the ListModel were removed the ListDataListener gets called and I get the indices of the removed interval.
The problem is, I get the indices after the elements were already removed. So I have no way of knowing what elements those were!
If I write the listener like this:
I do not get the correct result.public void intervalRemoved(ListDataEvent e) { Object thatWasRemoved = list.getElementAt(e.getIndex0()); System.out.println("Removed: "+thatWasRemoved); }
So my question is, how would I know which element has been removed?
Thank you all in advance.