0% found this document useful (0 votes)
220 views6 pages

Applet Architecture Java

Uploaded by

jeevitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
220 views6 pages

Applet Architecture Java

Uploaded by

jeevitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Applet Architecture in Java

Java GUI and Applet Basics


Introduction
• • Applet does not run independently.
• • Runs inside a browser or Applet Viewer.
• • Browser provides a container to control
applet lifecycle.
• • Security manager ensures safe execution.
Components of Applet
Architecture
• 1. Java Applet Class → Extends Applet, defines
init(), start(), paint(), stop(), destroy().
• 2. Applet Viewer/Browser → Loads and
executes applet.
• 3. Container → GUI area for displaying applet.
• 4. Security Manager → Ensures sandbox
security model.
Flow of Execution
• 1. Browser/Applet Viewer loads the applet.
• 2. init() → Initializes the applet.
• 3. start() → Starts execution.
• 4. paint() → Displays output.
• 5. stop() → Suspends execution when inactive.
• 6. destroy() → Cleans up before applet is
removed.
Applet Architecture Diagram
(Textual)
• Browser/Applet Viewer
• ↓
• Applet Class (extends Applet)
• ↓
• -----------------------------
• | init() → Initialization |
• | start() → Start execution |
• | paint() → Display output |
• | stop() → Suspend applet |
Key Points
• • Applet is controlled by browser/viewer.
• • No main() method.
• • Container manages applet lifecycle methods.
• • Security manager ensures restricted access.
• • Architecture ensures portability and safety.

You might also like