troubleshooting Question

Listener for SwingWorkerThreads

Avatar of nateforrest1
nateforrest1 asked on
4 Comments1 Solution224 ViewsLast Modified:
I have an application where I am spawning several SwingWorker threads to load images while the application is starting up.  I also have a login screen prior to showing them the main menu screen.  The problem is that sometimes the user can login faster then it takes for the SwingWorker threads to finish and the main menu screen isn't ready to display.  I've thought about putting the main execution thread to sleep for a second or two so that my SwingWorker threads will have enough time to finish, but I think there is probably a better way to handle this.  Is there any type of listener or design pattern to use to know when there are no more SwingWorker threads active?

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros