Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7644609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:43:53+00:00 2026-05-31T09:43:53+00:00

According to http://www.javaworld.com/javaworld/jw-08-2007/jw-08-swingthreading.html?page=5 all GUI operations should be executed in Event Dispatch Thread. While

  • 0

According to http://www.javaworld.com/javaworld/jw-08-2007/jw-08-swingthreading.html?page=5 all GUI operations should be executed in Event Dispatch Thread.

While I understand the reasons why Swing was designed with single threaded model in mind, I can’t figure out how to solve the following problem:

Let’s have a method called buildGui() which initializes main GUI of the application. Call to buildGui() method takes 10 seconds to return.

Let’s have another method called splashScreen() which shows the JDialog with indeterminate JProgressBar inside. The purpose of the JDialog is obvious: it gives user feedback that application is loading resources, initializing components, etc.

Now, if my program calls:

splashScreen();   // build and show splash screen in EDT
buildGui();       // build main GUI in EDT

the splash screen is freezed for 10 seconds, because it waits for buildGui() to finish.

Do you have any ideas how to show splash screen which depicts the status of GUI initialization (buildGui()) while following Swing’s single threaded model?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T09:43:54+00:00Added an answer on May 31, 2026 at 9:43 am

    Take a look at the Swing tutorial about splash screens which contains sample code doing exactly what you want

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://www.frostjedi.com/terra/scripts/demo/jquery02.html According to this link elements can be moved around by doing $('#container1').append($('#container2')). Unfortunately,
According to http://www.rebol.com/docs/core23/rebolcore-15.html You can use change/part to parse and replace but that doesn't
According to http://www.w3.org/TR/html401/interact/forms.html#h-17.4 , an input element should end with a single > and
According to http://www.codingforums.com/archive/index.php/t-98569.html , the date validation could be done using the javascript's date
my site is all happily Gzipped according to: http://www.gidnetwork.com/tools/gzip-test.php However when I run it
I'm trying to implement Matlab's rgb2gray in Java according to http://www.mathworks.com/help/toolbox/images/ref/rgb2gray.html . I have
According to http://www.bennadel.com/blog/1892-You-Cannot-Bind-The-Submit-Event-To-Objects-Using-jQuery.htm It is a bug: I am pretty sure this is a
The following is the definition of copy, according to http://www.sgi.com/tech/stl/copy.html . template<class InputIterator, class
According to http://www.html5samples.com/2010/03/html-5-canvas-the-2d-context-part-1/ This is the signature for the context.transform method context.transform(m11, m12, m21,
I was reading some C++ text at the address: http://www.parashift.com/c++-faq-lite/new/istream-and-while.html . According to the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.