eXtropia: the open web technology company
Technology | Support | Tutorials | Development | About Us | Users | Contact Us
 ::   Tutorials
 ::   Presentations
Perl & CGI tutorials
 ::   Intro to Perl/CGI and HTML Forms
 ::   Intro to Windows Perl
 ::   Intro to Perl 5
 ::   Intro to Perl
 ::   Intro to Perl Taint mode
 ::   Sherlock Holmes and the Case of the Broken CGI Script
 ::   Writing COM Components in Perl

Java tutorials
 ::   Intro to Java
 ::   Cross Browser Java

Misc technical tutorials
 ::   Intro to The Web Application Development Environment
 ::   Introduction to XML
 ::   Intro to Web Design
 ::   Intro to Web Security
 ::   Databases for Web Developers
 ::   UNIX for Web Developers
 ::   Intro to Adobe Photoshop
 ::   Web Programming 101
 ::   Introduction to Microsoft DNA

Misc non-technical tutorials
 ::   Misc Technopreneurship Docs
 ::   What is a Webmaster?
 ::   What is the open source business model?
 ::   Technical writing
 ::   Small and mid-sized businesses on the Web

Offsite tutorials
 ::   ISAPI Perl Primer
 ::   Serving up web server basics
 ::   Introduction to Java (Parts 1 and 2) in Slovak


Introduction to Web Programming
Applet Lifecycle  
  • An applet begins its life when the web browser loads its classes and calls its init() method. Thus, in the init() method you should provide initialization code such as the initialization of variables. Once the initialization is complete, the web browser will call the start() method in the applet. At this point the user can begin interacting with the applet.

  • But what would happen if the user moved to another web page while the applet was executing? Well, if this happens, the web browser will call the applets stop() method so that the applet can take a breather while the user goes off and explores the web some more.

  • If the user returns to the applet, the web browser will simply call the applet's start() method again and the user will be back into the program.

  • Finally, if the user decides to quit the web browser, the web browser will free up system resources by killing the applet before it closes. To do so, it will call the applets destroy() method.

  • You are welcome to override any of the methods in order to provide your own logic. For example, you may want to provide logic in the stop() method which performs some cleanup or save operation.

  • Finally, you can override destroy() to perform one-time tasks upon program completion. One example is cleaning up threads which were started in the init() method.

Previous Page | Next Page