Java applets are classes written in Java which are intended not to run as stand-alone programs (as applications do) but as subprograms of a browser which is already managing a window. |
Applets should NOT have main method but rather methods such as
|
The applet should be run through javac compiler getting a MyApplet.class file as before:
|
Also create an HTML file (say MyApplet.html) with an applet tag referencing MyApplet.class. |