O'Reilly logo

Python Programming with the Java™ Class Libraries: A Tutorial for Building Web and Enterprise Applications with Jython by Richard Hightower

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Advanced Topic: AppletContext and AppletStub

When an applet is created, it's given a stub via its setStub() method. The stub is the interface between the applet and the browser. You don't have to deal directly with the stub because the Applet class implements methods that use it.

Here are AppletStub's methods:

  • appletResize(width, height)— resizes the applet

  • getAppletContext()— gets the applet's context

  • getCodeBase()— gets the code base URL

  • getDocumentBase()— gets the document base URL

  • getParameterName()— gets an applet parameter

  • isActive()— determines if the applet is active

The applet context corresponds to the applet's environment and it can be used to show status, to load other documents, and to get access to other applets. The AppletContext's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required