Java Platform 1.2

java.applet
Interface AppletStub


public abstract interface AppletStub

When an applet is first created, an applet stub is attached to it using the applet's setStub method. This stub serves as the interface between the applet and the browser environment or applet viewer environment in which the application is running.

Since:
JDK1.0
See Also:
Applet.setStub(java.applet.AppletStub)

Method Summary
 void appletResize(int width, int height)
          Called when the applet wants to be resized.
 AppletContext getAppletContext()
          Gets a handler to the applet's context.
 URL getCodeBase()
          Gets the base URL.
 URL getDocumentBase()
          Gets the document URL.
 String getParameter(String name)
          Returns the value of the named parameter in the HTML tag.
 boolean isActive()
          Determines if the applet is active.
 

Method Detail

isActive

public boolean isActive()
Determines if the applet is active. An applet is active just before its start method is called. It becomes inactive just before its stop method is called.
Returns:
true if the applet is active; false otherwise.

getDocumentBase

public URL getDocumentBase()
Gets the document URL.
Returns:
the URL of the document containing the applet.

getCodeBase

public URL getCodeBase()
Gets the base URL.
Returns:
the URL of the applet.

getParameter

public String getParameter(String name)
Returns the value of the named parameter in the HTML tag. For example, if an applet is specified as
 <applet code="Clock" width=50 height=50>
 <param name=Color value="blue">
 </applet>
 

then a call to getParameter("Color") returns the value "blue".

Parameters:
name - a parameter name.
Returns:
the value of the named parameter.

getAppletContext

public AppletContext getAppletContext()
Gets a handler to the applet's context.
Returns:
the applet's context.

appletResize

public void appletResize(int width,
                         int height)
Called when the applet wants to be resized.
Parameters:
width - the new requested width for the applet.
height - the new requested height for the applet.

Java Platform 1.2

Submit a bug or feature Version 1.2 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.