This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

TableSorter errors when adding new data  RSS feed

Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nobr]so here is the deal:

I am using the helper class with DefaultTableModel

It works great when the data is static and I get it for the first time. however, occationally, when adding new data I get a NullPointerException error.

in use:
DefaultTableModel.removeRow() and
DefaultTableModel.insertRow() methods.

java.lang.ArrayIndexOutOfBoundsException: 5
at com.shared.model.TableSorter.modelIndex(
at com.shared.model.TableSorter.getValueAt(
at javax.swing.JTable.getValueAt(Unknown Source)
at javax.swing.JTable.prepareRenderer(Unknown Source)...

code problem I:

code problem II:

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!