[Advanced-java] window refresh question
Jesper Berglund
jesper.berglund at dataductus.se
Mon Apr 14 15:05:46 2003
Hi Alvin.
How does the application recieve data for the tables?
If it is on the event dispatch thread I can clearly see the swamping.
Try recieve the data on another thread and add it in you're tablemodel
with SwingUtilities.invokeLater().
Does the table show all the data available?
Make the operator search for the data that the operator is interested of
and set a maximum value for the number of rows in the table.
In my experience the "search for data by scrolling the table up and
down"-method with a large amount of table rows is inefficient and a
waste of time.
HTH
/Jesper Berlund
Alvin Wang wrote:
> Hi, I am writing a multi-window Java application. It receives huge amount of
> data from network and displays in JTables. So basically, it is swamped. When
> the users moves the windows, it does not have time to handle the repaint
> events, so the screen smears.
>
> In X-Windows, we can suppress the window events, which means the application
> will drop some events if it sees itself far behind. The other way in
> X-Windows is the server can save-behind, which means instead of trying to
> repaint some area, it will save that area for future repaint event.
>
> I am not a GUI expert. Can any guru give me some suggestions how to improve
> in Java world, or acheive similar strategies I described above in Java?
>
> Thanks very much!
>
> _______________________________________________
> Advanced-java mailing list
> Advanced-java@lists.xcf.berkeley.edu
> http://lists.xcf.berkeley.edu/mailman/listinfo/advanced-java
>