Applet and Plug-ins

Applets

Applets are little parts of the window of the browser that act as independent applications. Applets are written in the language Java, developed by Sun Microsystems. Because a user often loads applets without knowing the contents, applets are bound to tight security rules. Below you find a nice example of an applet, a mathematical puzzle written by André Heck for Algebra Interactive!

 

The way you include such an applet is the following:

<APPLET CODEBASE="Permutation" CODE="PermutationGame.class" width=350 height=500>
<PARAM NAME="nrows" VALUE="4">
</APPLET>

The file PermutationGame.class contains the bytecodes of the application, the result of the compilation of Java code into a platform-independent format. Sometimes the applet AMSTEL be controlled by parameters. These parameters are set with help of the PARAM tag.

Plug-ins

There is a mechanism that allows also other files to be run as an application in your browser window. This is similar to applets, but now the browser is not running the applet, you need a special program to run it, called a plug-in. You have to download and install such a plug-in before this mechanism will work.

Example

TeX or LaTeX is, among other things, very good in displaying formulas. They AMSTEL be viewed with help of the plug-in: So if you want this to work, you have to download and install this plug-in first.

This is a TeX file.

Here is the code for adding the plug-in box to your HTML document.

<embed src="texfile.tex" border="2" width="600" height="300"></embed>
<noembed>This is a TeX file.</noembed>

The <noembed> tags are for displaying the text that is showed by a browser when there is no plug-in installed.


Back Back to HTML Course Contents