Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTabel is not getting rendered properly.  RSS feed

 
Sham Phadtale
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am using AbstractTableModel and have created one customized table and table model. I also written code for pagination purpose. Everything is working fine except when pagesize and numbar rows are same. At this point table is not rendered even thought there is data in table model. No exceptions. I am getting blank pages having Tabel header but no data. When i debugged I found that for such condition(pagesize=no of rows in model), getValueAt() function does not get call. I am not sure what is happening. Please I require some guidelines.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sham Phadtale wrote: Please I require some guidelines.

Post your SSCCE code, which we can download on our machine and debug.
Please do take out time to click the SSCCE link to find out what it really means.
 
Sham Phadtale
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My problem is resolved. It was due to one global variable which is used in method getRowCount(). Value of this variable was not getting set correctly.
 
Sham Phadtale
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now I am facing another problem.
I am using TableRowSorter for sorting rows as per column selection. I have also written class for pagination purpose.
When I sort the table by click on Column header, only those rows are get sorted which re currently displaying. The rows which are present in table model but not displaying on current page are not sort. When I go to next page all rows on that page are sorted. I want to sort whole data in model on header click. For this what should I need to do?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!