The Applet Class

4 Likes Comment

The java.applet package is the smallest package in the Java API. The Applet class is the only class in the package. An applet is automatically loaded and executed when you open a web page that contains it. The Applet class has over 20 methods that are used to display images, play audio files and respond when you interact with it.
The applet runs in a web page that is loaded in a web browser. The environment of the applet is known as the context of the applet. you can retrieve the context using the getAppletContext () method. The life cycle of an applet is implemented using init (), start (), stop (), and destory ().
Use javac to compile applets and applet-viewer to execute them. You can view applets in any browser that is Java-enabled

You might like

About the Author:

Leave a Reply

Your email address will not be published. Required fields are marked *