An applet is a program written in the Java programming language that can be included in an HTML page, much in the same way an image is included in a page. When you use a Java technology-enabled browser to view a page that contains an applet, the applet's code is transferred to your system and executed by the browser's Java Virtual Machine (JVM). For information and examples on how to include an applet in an HTML page, refer to this description of the <APPLET> tag.
Every version of the Java Software Development Kit (aka JDK) includes a set of demo Applets which includes source code.
Java Plug-in software enables enterprise customers to direct applets or beans written in the Java programming language on their intranet web pages to run using Sun's Java Runtime Environment (JRE), instead of the browser's default. This enables an enterprise to deploy applets that take full advantage of the latest capabilites and features of the Java platform and be assured that they will run reliably and consistently.