• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Applet Sequence in Browser

 
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Usually as far as I know the sequence of an applet is following:
init()
Start()
Paint()
Run()
Stop()
Destroy()
I was testing my applet on different OS like Microsoft 2000 IE 5, on XP, .NET with IE 6 and on Netscape. I found that when you close your applet, IE 6.0 just called stop, doesn't called destroy method of an applet and rest of other I mean IE 5 called Destroy method of an applet, not stop.
Why some browsers has last method stop and others have last method of destroy.
Please let me know is there any common last method of an applet which will be invoke as last method of an applet by all browsers?
Thanks,
Angela

 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
stop() is the last method of the applet that should be called by any browser, and as far as you ( the programmer ) are concerned, it is the last method you should actually try to do anything to the applet in. destroy() is like the normal finalize()... it shouldn't be called directly, but it is called by the garbage collector. destroy() should only have code in it that releases resources that the applet holds ( files, sockets, etc. ) that the applet is holding a reference to that may not be taken care of correctly by the garbage collector. For all other purposes stop() is the last bit of code that you can run in an applet.

-Nate
 
Is this the real life? Is this just fantasy? Is this a tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic