aspose file tools*
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
Author

Table sorter going nuts once added another itam

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
Howdy,

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;
in

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

does anyone know what might be the problem?
thanks

the complete error is below.
Thomas Rowland
Greenhorn

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?

Thanks,
Tom
Michael Dunn
Ranch Hand

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

http://forum.java.sun.com/thread.jspa?threadID=744037

the solution from 74philip (Hi Craig) is the one you want
 
 
subject: Table sorter going nuts once added another itam
 
Similar Threads
TableSorter errors when adding new data
making sense of exception
Applet display problem in java 1.6
JTable woes
file reading in applet