Java Assignment
Make a digital clock.
Basic requirements
- The clock must be in a frame, not embedded in the page
- There must be a way to change the font size and color (this can
be in the clock itself, in the calling applet, or in some sort of
dialog.
- The program must use at least one example of each:
- Scrollbar
- Checkbox or checkbox group
- choice or list
- GridbagLayout
- SimpleDateFormat to control time and date output
Bonus challenges
Try one of these challenges for extra credit:
- Add a canvas with an analog clock. (Hint: you will need some
trigonometry to figure out how to draw the hands. I'll help you with the
trig functions if you need it.)
- Add an alarm feature. The user should be able to set the alarm,
and when the time has occurred, a sound plays.
Have fun!!!
© Andy Harris
Indiana University / Purdue University, Indianapolis
email:
aharris@cs.iupui.edu
homepage:
http://www.cs.iupui.edu/~aharris