[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

refreshing jPanel at intervals

Posted on 2003-11-03
4
Medium Priority
?
202 Views
Last Modified: 2012-05-04
I have an application that retrieves a lot of records from different tables in a database. It then creates different panels as tabs in a JTabbedPane to display the tables.
My problem is, I don't want it to finish pulling all the records before displaying the panels all at once. I want it to display each panel progressively as it populates it with records. I have tried the validate(), revalidate(), repaint() methods and it still won't work. Any help on this?
0
Comment
Question by:kunlenzo247
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 92

Expert Comment

by:objects
ID: 9675243
How r u displaying the data on the panels?
0
 
LVL 15

Accepted Solution

by:
jimmack earned 400 total points
ID: 9675303
Sounds like you're trying to retrieve the records an update the GUI within the same thread.

Consider moving the database retrievals into a thread on their own (perhaps a SwingWorker), so that the GUI is free to update as you progress.

http://java.sun.com/products/jfc/tsc/articles/threads/update.html
0
 

Author Comment

by:kunlenzo247
ID: 9683616
Hi Jimmack, I appreciate your advice. I was able to use the SwingWorker to thread different processes and my appliaction is working fine now. Thanks
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9684971
No problem ;-)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question