File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes TableSorter repaint problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "TableSorter repaint problem" Watch "TableSorter repaint problem" New topic

TableSorter repaint problem

Thanga prakash Somasundaram

Joined: Feb 07, 2003
Posts: 21
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,<br />stp<br /> <br />Have a Nice Day...
Shirley Li

Joined: Sep 22, 2000
Posts: 14
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?
Chantal Ackermann
Ranch Hand

Joined: Sep 28, 2000
Posts: 508
are you using a custom renderer? if so, you should have a look at in jdk1.4. it overwrites several methods to improve performance.
Thanga prakash Somasundaram

Joined: Feb 07, 2003
Posts: 21
Hi all,
Thanga prakash Somasundaram

Joined: Feb 07, 2003
Posts: 21
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

Joined: Oct 18, 2000
Posts: 4121

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.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: TableSorter repaint problem
It's not a secret anymore!