Results 1 to 2 of 2
  1. #1
    fanjavaid is offline Member
    Join Date
    Dec 2012
    Location
    Jakarta, Indonesia
    Posts
    23
    Rep Power
    0

    Default Loading background in Splash Screen

    Hello, i have application that need load some resource in background. And i use splash screen.
    Where i must put the loading resourse in this init method?

    Java Code:
    /**
         * just a stub to simulate a long initialization task that updates
         * the text and progress parts of the status in the Splash
         */
        private static void appInit()
        {
            for (int i = 1; i <= 10; i++)
            {   // pretend we have 10 things to do
                int pctDone = i * 10;       // this is about the only time I could calculate rather than guess progress
                splashText("Doing task #" + i);     // tell the user what initialization task is being done
                splashProgress(pctDone);            // give them an idea how much we have completed
                try
                {
                    Thread.sleep(1000);             // wait a second
                    Application.getInstance();    // i try to put in this, but it silent for some second, 
                }
                catch (InterruptedException ex)
                {
                    break;
                }
            }
        }
    I want loading is simultaneously with progress bar, please help me thank you.. :)

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: Loading background in Splash Screen

    Perhaps a progress bar: JProgressBar (Java Platform SE 6)

    I'm assuming you mean such a thing and not a splash screen as in one of those images that applications sometimes display at startup when they're incapable os starting expeditiously.

Similar Threads

  1. Splash Screen How?
    By bircastri in forum AWT / Swing
    Replies: 1
    Last Post: 11-16-2010, 04:51 PM
  2. Splash Screen
    By madcommu in forum SWT / JFace
    Replies: 4
    Last Post: 09-18-2010, 01:14 PM
  3. splash screen
    By joypik in forum AWT / Swing
    Replies: 1
    Last Post: 07-13-2010, 07:48 PM
  4. Loading screen using splash windows
    By andres3546 in forum Advanced Java
    Replies: 1
    Last Post: 10-27-2009, 08:27 PM
  5. Splash Screen
    By Doctor Cactus in forum New To Java
    Replies: 1
    Last Post: 10-29-2008, 06:42 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •