Assignment 2: Analog Clock Control
Due 2/23
Purpose
The purpose of this program is to gain familiarity with Java's event facilities, including the ability to use interface widgets.
The Problem
You must add a text-field below the clock to allow the user to set the time displayed on the clock.
The requirements of the project are:
- Your program should meet the requirement of project 1 except that the clock does not need to tick.
- The clock should display the current time when it starts.
- The text-field is centered under the clock. It should show the time on the clock with the form of hh:mm:ss (e.g., 05:23:46). Users should be able to change the time by entering a new value (e.g., 06:13:30) and pressing the Enter key. The system should take the value and display the new time on the clock.
- Name your main class file AnalogClock.java. Your code should compile with command-line javac AnalogClock.java
and run with command-line java AnalogClock.
- Follow good coding standards (well structured, indented, and documented code) and
Java naming conventions.
Due date
This program is due on or before 2/23. This means it must be received by 11:59pm EDT 2/23 to not be considered late.
Submitting
Submit your program by creating a zip file with your last name as the file name containing all the source code files
related to your project, email to lqiu@oswego.edu with "CS520 Project 2 - your name" as the subject.
When I extract your zip file, your zip file should create a directory with your last name and all the code should be in that directory.
Do not send your source code directly as attachment to your email because some email program may add line-ending characters to your code which makes it fail to compile on my machine.
Grading rubrics