I hope that someone has some insight into this. I have been fighting with it for two days...
I have written an applet that is supposed to display a JProgressBar and text status messages while it checks for a certain file on the client hard drive, downloads and extracts it if it is missing, and then launches the file (a custom MOzilla build).
Everything works fine as an application, but after porting to JApplet, the sequencing is all messed up. The GUI method is running when it should, as evidenced by console output, but the GUI is not appearing until after the file is copied and extracted, and I think after the executable launch has been initiated.
Does this sound familiar to anyone?? What is going on???
Well, that's not a lot of information to go on, but I'd be willing to bet that you're executing your code in the applet constructor or the init() or start() methods. The applet is not displayed until AFTER start() finishes. You should take a look at the life cycle of an applet to understand the problem, then take a look at threads in applets for a solution.