jQuery in Action, 3rd edition
The moose likes Swing / AWT / SWT and the fly likes Table sorter going nuts once added another itam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Table sorter going nuts once added another itam" Watch "Table sorter going nuts once added another itam" New topic

Table sorter going nuts once added another itam

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755

I've successfully implemented the table sorter from the sun website. Problem is when I add another item to the table - I get an ArrayIndexOutOfBoundsException.ArrayIndexOutOfBoundsException.

specifying the problem at: return getViewToModel()[viewIndex].modelIndex;

public int modelIndex(int viewIndex) {
return getViewToModel()[viewIndex].modelIndex;

does anyone know what might be the problem?

the complete error is below.
Thomas Rowland

Joined: Nov 01, 2006
Posts: 1
I am experiencing the same problem. I have struggled with this for days and have resorted to removing the TableSorter unless I can find a solution.

I have tried swapping out the sorterTableModel and replacing it with the original tableModel while updates are happening, but this does not work.

Anyone have any insight they can share?

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
this problem was also posted to sun's forum


the solution from 74philip (Hi Craig) is the one you want
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Table sorter going nuts once added another itam
It's not a secret anymore!