Here is applet's life cycle:
Next slide