This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TableSorter repaint problem

 
Thanga prakash Somasundaram
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I built an application, Which has a table with sorting support and dynamic addition and deletion of rows.. When the new rows are added in the sorted order, the repaint triggered in between sorting goes
on. The table shows unordered rows..
I am getting messages in the thread, which is used to update the table dynamically.
How to make the ordered set of rows in the table, while there are large number of messages are coming into the Table? How to block the repaint method smoothly without affecting the performance of the application..
please, guide me in this regard..
by,
stp
 
Shirley Li
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I also have an application which performs sorting of the columns. It works fine even though i have 800 to 900 rows. Are you using Java1.4?
shirley
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are you using a custom renderer? if so, you should have a look at DefaultTableCellRenderer.java in jdk1.4. it overwrites several methods to improve performance.
chantal
 
Thanga prakash Somasundaram
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
 
Thanga prakash Somasundaram
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
ignore the previous empty reply..
thanks for immediate response..
i am using java 1.3..
I am using TableSorter --derived from --> TableMap -->AbstractTableMode and implements TableModelListener...
while dynamic addition of rows, the repaint process displays unordered list of rows in the table.
Pls, help me
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you are using a custom model (TableMap isn't a class that comes with the JDK), you'll need to check and see if it's causing the problem.

Also, if you are using any custom renderers (like Chantel posted) you'll need to make sure they aren't causing the slowdown either.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic