Click here to visit our sponsor
Free Advertising from Click2Net!


Java Applets


General :
An applet has the extention ".class" and must be specified in a ".html"-file. There you specify the applet NAME, WIDTH and HEIGHT. You can also specify the CODEBASE , which is for locating the directory where the applet can find the images or sounds if such are required by the applet. If you put all the files in the same directory as the ".class"- and "html"-file this value is not required. The applets are configured by changing parameter values in the html-file , the general structure is seen below:
    <APPLET CODE="myapplet.class" CODEBASE="mycatalog"    
    WIDTH=230 HEIGHT=190>   
    <PARAM name="myparameter" value="myvalue">    
    <PARAM name="anotherparameter" value="anothervalue">
    </APPLET>
The name of the parameter specifiy what parameter will be set, it could be a color parameter , text parameter , image-name parameter and so on. The value of the parameter is then set to the appropriate number or text giving the applet information on what it should do. For more information on any individual parameter please read the file readme.txt in the applet zip-files.


Fonts :
When you download applets which displays text you will often be able to choose between the platform independent fonts seen in the picture to the right. You will also be able to choose between using "Bold" or "Italic" on all fonts.


Colors :
Color are choosen from the RGB format like red , blue , green , cyan , white , magenta , yellow..etc. It can be written in such a way:
    <BODY TEXT="white" BGCOLOR="black" ....or...>
    <BODY TEXT="#FFFFFF" BGCOLOR="000000".......>
It is often very difficult to obtain the colour code in the hexadecimal , 'xxxxxx' for scripts and for java applets in the form of 'xxx,xxx,xxx',where 'x' is the hexadecimal digit.


Images and sound :
Some java-applets requires sound or pictures. The sound files must be in .au-format with a frequency of 8 kHz. The images must be in GIF or JPEG format. Note that the programs accepts transparent GIF 89 images , although some browsers show the transparent areas with some dots.
You can chance the sound clip for each applet. Just copy the sound clip file into  the same directory , and rename the filename in the source code as for images , links and messages.
    <param name="SOUND" value="filename.au">

Installation Instructions :
Just cut and paste the source code onto the BODY of your webpage. You can use any HTML editors or your notepad. The HTML source code with sound clips and classes are all in ZIP form. So, download it, unzip it and save it into the same directory!. Please change the filename, give a title for that page and try to modify the source code! I will try to give the comment for the important lines. The source code will also printed out for each example.

If you are not clear about the steps goto my installation page to view the complete steps to do it. here i will guide you step by step on the installation of the java applets and java scripts to your web page.



My collection of all these Java Applets are in :




If you have any suggestions , questions or problems with my page , please foward it through e-mail. If you have any interesting Java Applets or Java Scripts sites , please let me know the URL.




Copyright of Vincent Wong 1996-1999. All Rights Reserved.