Home

This Chapter
-Chapter 20: Applets
-A Brief History of Applets
-The Applet API
-Security Restrictions
-Writing and Deploying Applets
-How AppletViewer Works
-Passing Parameters to an Applet
-SoundPlayerApplet
-JApplet
-Applet Deployment in a JAR File
-Summary
-Questions

Table of Contents
-Introduction
-Chapter 1: Your First Taste of Java
-Chapter 2: Language Fundamentals
-Chapter 3: Statements
-Chapter 4: Objects and Classes
-Chapter 5: Core Classes
-Chapter 6: Inheritance
-Chapter 7: Error Handling
-Chapter 8: Numbers and Dates
-Chapter 9: Interfaces and Abstract Classes
-Chapter 10: Enums
-Chapter 11: The Collections Framework
-Chapter 12: Generics
-Chapter 13: Input Output
-Chapter 14: Nested and Inner Classes
-Chapter 15: Swing Basics
-Chapter 16: Swinging Higher
-Chapter 17: Polymorphism
-Chapter 18: Annotations
-Chapter 19: Internationalization
-Chapter 20: Applets
-Chapter 21: Java Networking
-Chapter 22: Java Database Connectivity
-Chapter 23: Java Threads
-Chapter 24: Security
-Chapter 25: Java Web Applications
-Chapter 26: JavaServer Pages
-Chapter 27: Javadoc
-Chapter 28: Application Deployment
-Appendix A: javac
-Appendix B: java
-Appendix C: jar
-Appendix D: NetBeans
-Appendix E: Eclipse

Previous
Next

 

Chapter 20

Applets

An applet is small a Java program that runs inside another application, usually a Web browser or an applet viewer. The JDK includes an applet viewer that makes it easy for you to test your applets. However, most of the time your applets will run inside a Web browser.

This chapter starts with a brief history of applets and by introducing the java.applet.Applet class. However, it is easier to write a subclass of Applet, javax.swing.JApplet, just as it is easier to write Swing applications than using AWT components. Besides, JApplet is much more powerful than Applet so you should always subclass JApplet for your applet classes.

Previous
Next