Basic HTML version of Foils prepared 18 May 97

Foil 6 Some Basic Methods for Applets -- I

From Java Tutorial - Spring 1997 Part 3:Graphics and the Abstract Windowing Toolkit Peking Tutorial, Web Certificate -- Spring-Summer 1997. by Nancy J. McCracken,Geoffrey C. Fox


1 Some of These are in Applet and some in parent (in particular Component)
2 public void init() is called ONCE and ONCE only when the applet is loaded or reloaded. Set initial parameters etc. here.
3 public void destroy() is what you do when Applet is entirely finished and you need to clean up stray threads or connections to be closed.
4 public void start() is called whenever the applet is started which can happen several times during an applet's life-cycle as it starts each time you revisit a page
5 public void stop() is called when we temporarily leave Applet to visit another page. A wise move would be to suspend running of Threads to save system resources.

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Thu Jan 8 1998