If you are interested in playing poker on the internet, I recomend Everest Poker. By signing up with Everest Poker you get an USD 100 welcome bonus. I highly recommends this site where there is an excellent selection of tables and an unusually high proportion of fish (weak players)!

|[ProbabilityOf.com Main page]|

Current Local time : Your browser do not support java!

The Code file: ISOClock.java

The Code for this Clock looks like this

/*
 * ISO compatible Clock
 */

import java.util.*;
import java.awt.*;
import java.applet.*;
import java.text.*;

/**
 * ISO compatible Clock
 * Created by Nikolai Sandved (webmaster@ProbabilityOf.com)
 * Published at http://www.ProbabilityOf.com/ISOClock.shtml
 */

public class ISOClock extends Applet implements Runnable {
    Thread timer;                // The thread that displays clock
    SimpleDateFormat formatter;  // Formats the date displayed
    String lastdate;             // String to hold date displayed
    Font clockFaceFont;          // Font for number display on clock
    Date currentDate;            // Used to get date to display
    Color numberColor;           // Color of second hand and numbers

    /* dd   - 01-31 day with leading zero
       EEE  -
       MM   - 01-12 Month with leading zero
       MMM  - Jan, Feb, ..., Dec Month abr. three letter
       yyyy - Four digit Year
       HH   - 00-24 Hour
       hh   - 00-12 Hour
       mm   - 00-59 Minute
       ss   - 00-59 Seconds
     */
    String OwnDateFormat;        // Digital Clock Format                             
    int ClockFontSize;           // Size on Font used to display Digital Clock

    /* Serif
       TimesRoman
       Courier
    */
    String ClockFont;            // Font used to display Digital Clock

    public void init() {
        OwnDateFormat = "yyyy-MM-dd HH:mm:ss"; // This is the ISO standard
        ClockFontSize = 12 ; 
        ClockFont = "Serif"; 
        formatter = new SimpleDateFormat (OwnDateFormat, Locale.getDefault());
        currentDate = new Date();
        lastdate = formatter.format(currentDate);
        /*blue, darkGray,...*/
        numberColor = Color.black;

        try {
            setBackground(new Color(Integer.parseInt(getParameter("bgcolor"),16)));
        } catch (Exception E) { }
        try {
            numberColor = new Color(Integer.parseInt(getParameter("fgcolor"),16));
        } catch (Exception E) { }
        try {
            OwnDateFormat = new String((getParameter("ODateFormat")));
        } catch (Exception E) { }
        try {
            ClockFont = new String((getParameter("CFont")));
        } catch (Exception E) { }
        try {
            ClockFontSize = Integer.parseInt(getParameter("CFontSize"));
        } catch (Exception E) { }
        
        clockFaceFont = new Font(ClockFont, Font.PLAIN, ClockFontSize);

        resize(12*ClockFontSize,ClockFontSize+10);              // Set clock window size
    }

    // Paint is the main part of the program
    public void paint(Graphics g) {
        String today;
        currentDate = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("s",Locale.getDefault());

        formatter.applyPattern(OwnDateFormat);
        today = formatter.format(currentDate);

        g.setFont(clockFaceFont);

        // Get background color.
        g.setColor(getBackground()); 
        // Overwrite laste date with background color
        g.drawString(lastdate, 1, ClockFontSize+1); 

        // Set date color
        g.setColor(numberColor);  
        g.drawString("", 1, ClockFontSize+1);
        g.drawString(today, 1, ClockFontSize+1);

        lastdate = today;
        currentDate=null;
    }

    public void start() {
        timer = new Thread(this);
        timer.start();
    }

    public void stop() {
        timer = null;
    }

    public void run() {
        Thread me = Thread.currentThread();
        while (timer == me) {
            try {
                Thread.currentThread().sleep(100);
            } catch (InterruptedException e) {
            }
            repaint();
        }
    }

    public void update(Graphics g) {
        paint(g);
    }

    public String getAppletInfo() {
       return "Title: A ISO compatible Clock \nAuthor: Nikolai Aasen, 1999";
    }
  
    public String[][] getParameterInfo() {
        String[][] info = {
            {"CFontSize", "Font Size", "Font size"},
            {"bgcolor", "hexadecimal RGB number", "The background color. Default is the color of your browser."},
            {"fgcolor", "hexadecimal RGB number", "The color of the seconds hand and numbers. Default is dark gray."},
            {"ODateFormat", "Date Format", "dd - 01-31 day with leading zero, EEE  -, MM - 01-12 Month with leading zero, MMM - Jan, Feb, ..., Dec Month abr. three letter, yyyy - Four digit Year, HH - 00-24 Hour, hh- 00-12 Hour, mm - 00-59 Minute, ss - 00-59 Seconds"},
            {"CFont", "Font to the Clock", "TimesRoman, Courier, Serif"}
        };
        return info;
    }
}

[ProbabilityOf.com]   | [Lotto probabilities]   | [Poker probabilities]    | [DOOM] | [Easter Dates] | [Einstein Quiz] | [Escape Game] | [Excel] | [ISO 8601] | [ISO Clock] | [IQ Tests] | [Symmetrical Democracy] | [The Toilet Paper Roll Poll] | [Women=Problems] | [WRC]
If you are interested in playing poker on the internet, I recomend Everest Poker. By signing up with Everest Poker you get an USD 100 welcome bonus. I highly recommends this site where there is an excellent selection of tables and an unusually high proportion of fish (weak players)!

Current local time () Your browser do not support java!
This page () was downloaded at and was last updated at

Valid HTML 4.01!

Did you see any errors on, or have other comments to this page? Please send Nikolai Sandved an e-mail at webmaster@probabilityof.com

"The views expressed herein are the personal views and opinions of the current user and are not made on behalf of his or her current employer."