Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TableSorter errors when adding new data

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