World Clock



ClockApplet is a simple component that allows you to show the correct local time in a specified time zone for your Web page. This applet is free software, licensed under the GNU General Public License v1.0. The code for accessing Network Time Protocol servers is based on the Java SNTP Client, by Adam Buckley.

How To Use:

  • Download clockapplet.zip (16 KB)
  • Unzip with a compression utility.

    Java Source:

    import java.awt.BasicStroke;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Font;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Paint;
    import java.awt.RenderingHints;
    import java.awt.Stroke;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.geom.Ellipse2D;
    import java.awt.geom.Line2D;
    import java.io.IOException;
    import java.lang.reflect.Field;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.TimeZone;
    
    import javax.swing.JApplet;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    

    Sample HTML Source:

     <!--[if !IE]>-->
          <object classid="java:net/sourceforge/clockapplet/ClockApplet"
                  type="application/x-java-applet"
                  archive="clockapplet-0.1-SNAPSHOT.jar"
                  height="44" width="100" >
            <param name="foreground.color" value="black" />
            <param name="background.color" value="#9DC1D9" />
            <param name="target.timezone" value="America/Chicago" />
            <param name="ntp.server" value="pool.ntp.org" />
          <!--<![endif]-->
    

    Status: Free for non-commercial use

    Author: The ClockApplet Authors

    Homepage: http://clockapplet.sourceforge.net/

    Upload Date:
    Oct. 19, 2006

    How to Add Java Applets to Your Site

    New on the Java Boutique:

    New Review:

    Time Management Made Easy with the Quartz Enterprise Job Scheduler
    Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

    New Applet:

    Reverse Complement
    Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

    Elsewhere on internet.com:

    WebDeveloper Java
    Lots of Java information on webdeveloper.com

    WDVL Java
    Thorough Java resource at the Web Developer's Virtual Library.

    ScriptSearch Java
    Hundreds of free Java code files to download.

    jGuru: Your View of the Java Universe
    Customizable portal with online training, FAQs, regular news updates, and tutorials.