This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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
Author

TableSorter repaint problem

Thanga prakash Somasundaram
Greenhorn

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,
stp


by,<br />stp<br /> <br />Have a Nice Day...
Shirley Li
Greenhorn

Joined: Sep 22, 2000
Posts: 14
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

Joined: Sep 28, 2000
Posts: 508
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

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

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
Bartender

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.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TableSorter repaint problem