File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reloading Applet

 
Saulo Menezes
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone!
I have been searching for a while for a code that would let me reload my Applet, but I haven't found anything really. Would anyone be able to tell me if there's a code that would allow that to happen.
It's just that I've created an Applet and there's a button whose event handler must restart the whole Applet but up to now it's not operating at all. I would be grateful if somebody could answer me this.
Yours,
Saulo
 
Sanjeev Kaushik
Ranch Hand
Posts: 105
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If you look at the life cycle of applet, which is as under
init() -> start() -> stop() -> destroy()
once applet is loaded, browser(applet container) calls init() method of that applet. After this start() method. If applet is behind the screen browser may call stop() method. And browser is closed browser call the destroy method. Once this window comes in focus, start() method is again called. In this cycle init() is called only once.
So as you said you have put a button to reload the applet. If you are calling init() explicitly method on the event of that button, it must reinitialize the applet.
Regards,
Sanjeev Kaushik
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic