Question

I am building a JApplet in NetBeans. When the application is initially ran it needs to download some files onto local PC first for it to properly work. Once it is done downloading these files than the GUI should be drawn. How do I pause the JApplet from drawing the GUI until the files are downloaded? Please also note I will need to show the user another GUI that indicates that files are being downloaded, what is the best way of solving this problem? Thank you.

@Override
public void init() {

//THIS IS WHERE THE CODE FOR DOWNLOADING FILES SHOULD BE AND ITS GUI



    /* Create and display the applet */
    try {
        java.awt.EventQueue.invokeAndWait(new Runnable() {

            @Override
            public void run() {
                initComponents();//Draws the main GUI after files have been downloaded
            }
        });

    } catch (Exception ex) {}
}
Was it helpful?

Solution

Sounds like you need a Splash Screen.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top