Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable with Model Filters  RSS feed

 
Thomas Jarad
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i have Table Model and another TableModelFilter which extends TableModel.
how ever for some reason when the Jtable is set with TableModel Filter as it model the Data is not shown in to the tables unless i click on the header . it is get shown only when i click once on any one of the headers.
and this doesnt happen when i just pass the TableModel as the Model to the JTable
any pointers or any hints as to what exactly happens beneath the hood would help me a lot
thanks in advance
Thomas
 
Grub de Bliek
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apparently you TableModelFilter doesn't work correct. Can't say what's wrong with it.
Here's a TableSorter that works with indexes. I once implemented a TableFilter that looked alot like a TableSorter, so this might be a good example.
http://www2.gol.com/users/tame/swing/examples/JTableExamples5.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!