Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet GUI display delayed

 
Amy Cham
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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???
 
Joe Ess
Bartender
Posts: 9339
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic