Object-Oriented Programming with Java Lecture Notes

17 April 2008 • Applets


Outline

History

Broswer Java

Applets

The Applet Class

applets in context

  • Applet abstracts web-page real estate.

    • In this Applet correspond roughly to frames.

  • Applet contains AWT components; JApplet contains Swing and AWT components.

    • Don't confuse Applet and JApplet.

Applets And Applets

Applet Life-Cycle

Life-Cycle Example.

import java.applet.Applet

public class sa
extends Applet

  @Override public void init()
    System.out.println("in init()")

  @Override public void start()
    System.out.println("in start()")

  @Override public void stop()
    System.out.println("in stop()")

  @Override public void destroy()
    System.out.println("in destroy()")

Life-Cycle Example..

Life-Cycle Parts

Applet vs Program Structure

Applet vs Program Attributes

Applet HTML

Applet Tag Attributes

Applet Class Loading

Alternate Load Directories

Class File Downloading

Applet Parameters

Reading Parameters

The Object Tag

Java And Browsers

Checking Browser Plugins

Enabling Java

Java Console

JVM Caching

Non-Java Browsers

Example

<applet code = ...
 alt = "[Enable Java to see this applet.]"
>

[Install the Java plug-in 
to see this applet.]

</applet>

Appletviewer

Applet Security

Sandboxing

Applet Resources

The Security Profile and Manager

Signed Applets

Web Start

External Plug-Ins

JNLP

JNLP Files

Web Start


This page last modified on 10 April 2008.

Creative
    Commons License