Java clock applet.


Reads the time from the providers computer
This way the exact local time can be displayed.

Install in short.
Put the applet tags in your html page where you want your applet to be.
Then upload(=put on providers computer) the class file and used pictures.
The applet class file must be in the same directory as the html file.
The class file is a binary file so upload as a binary not text.

Applet tag description:

<applet code="Clock2.class" width="206"height="156">
This is the applet starting tag.
It tells the browser the name of the applet program.
This applet program will be downloaded automatically and when the page is visited.
It will be executed on your computer.
This will be done in a save environment.
This environment is a virtual computer called the Java Virtual Machine. (=JVM)
The JVM is on all computer the same.
This way the Java applet runs on every computer type , Macintosh UNIX it doesn't matter.
Note with the code attribute you only can tell the name of the applet program.
You can't add a path in it !!!
The applet class file must be in the same directory as the html file.
Width and height do speak for them selves.

<param name="background"value="domin.gif">
If you want to use a background you do have to tell the applet its name.

<param name="method" value="0">
There are several ways how the applet determines its starting time.
The methods are :
0 = lets the applet look for the time on the visitors computer. (called client computer).
But there is a strong disadvantage on this.
To time on your side has to be recalculated from the client (visitors) time.
For this the applet needs to know the clients time zone and time.
Sometimes these aren't correctly set.
Also some browsers do return the wrong time and or time zone.
Sometimes the clients daylight saving time mess things up.
1 = Lets the applet use an CGI script on the server side.
A CGI script is a small program on the providers computer.
It is triggered by the browser visiting the page.
This script provides the applet with a correct starting time.
More on this is explained further on where the script+name parameter is discussed.
2 = Read the time from the servers time port.
Each server (providers computer) has a time port.
This port can be queried by the applet to get the servers time.
The computer where the applet is on must have its time port enabled.
To go into technical details isn't necessary , so I'll omit that.
If you want to know html pages are served on port 80 , email at 25 , time at 37.

<param name="script_name" value="/cgi-bin/">
By default the applet calls the script when mehthod 1 is selected.
So normaly you will not need this tag.
This tag makes it possible to let call another script.
The script is included in the zip file.
Also included is the script which returns the servers local time.
GMT also called universal time = the time in Greenwich in Great Britain.
GMT (Greenwich Mean Time).
Normally CGI scripts are placed in a separate directory.
You probably aren't allowed to install CGI scripts yourself.
This is because a bad written CGI script could wipe the servers harddisk.
So you will have to ask your provider to install the script for you.
When the script input fails the GMT time from the visitors computer is red.

<param name="correction" value="-36000000">
You can also adjust the time with this tag.
The values are milliseconds.
Note: Don't use a plus sign.
It may be necessary to adjust the time.
The time port and the provided return the current time at 0 degrees longitude.
The adjustment then must be equal to your time zone.
The script just returns the providers local time .

<param name="font" value="TimesRomen">
This changes the text font.
If the browser doesn't support the font its default font will be used.
Most browsers do support TimesRoman.
Other commenly supported fonts are : Helvetica Courier.
The names are case sensitive.

<param name="font_color" value="#FF0000">
The color of your text.
It has the same syntax as the bgcolor tag in the html body.
Only color names aren't supported.
Don't forget the # sign.
It is an RGB representation of the color.
RGB = Red Green Blue.
Some examples :
red = #FF0000
green = #00FF00
blue = #0000FF
white = #FFFFFF
black = #000000

<param name="font_size" value="13">
Quite simple this is the font size.
If you omit this complete tag the value is 12.

<param name="font_style" value="1">
Three font styles are possible
0 = plain
1 = bold
2 = italic
If you omit this complete tag then plain is used

<param name="xtext" value="100">
<param name="ytext" value="83">
With this you position the text on the map.
If you omit a tag it is centered in that direction.

<img src="domin.gif">
There are a few browsers that don't support Java.
95% of the curently used browsers do support Java without plug in.
Some ancient browsers do not support Java.
Also some browsers written for the 16 bit Windows 3.1x don't support it by default.
This tag will only be executed by non Java browsers.

This is the applet ending tag.
It tells the browser no more parameter tags will follow

Copyright :
- It may be used for free on NON-COMMERCIAL PRIVATE HOMEPAGES.
- For any other use or distribution rights contact the author.

RJHM van den Bergh , 1998 All Rights Reserved. or
JADS = Java Applet Download Site =