Digital Clock

Your browser is not Java enabled.

Introduction

This is my first applet-cum-application. This digital clock displays the local time in 24-hour format. Hours, minutes and seconds are displayed as 7-segment BCD-LED digits with segments tapered at both ends.

Features

Usage: Applet

Applet tags Property Syntax Default
fColor Foreground color "r,g,b" "0,255,0"
bColor Background color "r,g,b" "0,0,0"
sWidth Segment width "w" "6"
sHeight Segment height "h" "7"
sThickness Segment thickness "t" "2"

Usage: Applcation

java DigClock -bg "100,100,100" -fg "200,200,200" -sw 6 -sh 7 -st 2

Command-line arguments Property Syntax Default
fg Foreground color "r,g,b" "0,255,0"
bg Background color "r,g,b" "0,0,0"
sw Segment width "w" "6"
sh Segment height "h" "7"
st Segment thickness "t' "2"

Remarks

The height and width of segments may differ significantly from the set values to match the application/applet size. The difference will be wide when the application is resized.

Source

DigClock.java


Last modified: Fri Jun 18 11:50:39 India Standard Time 1999

Subbu Allamaraju 1998, 1999. All rights reserved.

All copyrights and trademarks acknowledged.