What is the best way to sort a collection while updating a progress bar? Currently I have code like this:
for (int i = 0; i < items.size(); i++) { pro
Why not implement your own merge sort (which is what Collections.sort is doing) and update the progress bar at key points of the algorithm (say, after each merge of more than 5% of the array)?