Package java.applet |
![]() Previous |
![]() Java API |
![]() Index |
![]() Next |
public interface java.applet.AppletStub { // Methods public abstract void appletResize(int width, int height); public abstract AppletContext getAppletContext(); public abstract URL getCodeBase(); public abstract URL getDocumentBase(); public abstract String getParameter(String name); public abstract boolean isActive(); }
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.
public abstract void appletResize(int width, int height)Called when the applet wants to be resized.
Parameter Description width the new requested width for the applet height the new requested height for the applet
public abstract AppletContext getAppletContext()Return Value:
Returns the applet's context.
public abstract URL getCodeBase()Return Value:
Returns the URL of the applet.
public abstract URL getDocumentBase()Return Value:
Returns the URL of the document containing the applet.
public abstract 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>A call to getParameter("Color") returns the value "blue".
Return Value:
Returns the value of the named parameter.
Parameter Description name a parameter name
public abstract boolean isActive()Determines if the applet is active. An applet is active just before its start method is called. It becomes inactive immediately after its stop method is called.
Return Value:
Returns true if the applet is active; false otherwise.