I thought this would be easy to find premade, but it seems any solution I can find on the web solves only part of the problem.
I want to sort a list of Filenames
If you use the Comparator suggested by @millimoose (http://www.davekoelle.com/alphanum.html) modify it to pass the Collator
public class AlphanumComparator implements Comparator
{
private Collator collator;
public AlphanumComparator(Collator collator) {
this.collator = collator;
}
.....
public int compare(Object o1, Object o2)
{
......
result = thisChunk.compareTo(thatChunk); //should become
collator.compare(thisChuck, thatChuck);
....
this code seems to have a problem, for example "01" is grater then "2". But this depends on you preference, if this is important modify it to skip the leading zeros before number compare.