June 2002
Beginner to intermediate
640 pages
14h 24m
English
Let's start off with an interactive session. Import Applet from the java.applet package.
>>> from java.applet import Applet >>> applet = Applet()
An applet is a panel (java.awt.Panel), and, as we learned earlier, a panel is also a component.
>>> applet.class.superclass <jclass java.awt.Panel at -731859681>
So, if an applet is a panel, and a panel is a component, an applet is also a component (and thus a component container). That means that everything you've learned about components and panels applies to applets as well.
Applet inherits all of class java.applet.Applet's functionality. What's more, the Applet class employs the Façade design pattern, which facilitates the use of many utilities ...
Read now
Unlock full access