Skip to content

Latest commit

 

History

History
 
 

Java Projects

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

*Java Swing is a Java GUI widget toolkit that comes with various useful widgets. It is a part of the Java Foundation Classes(JFC). JFC contains many packages for creating desktop applications.

We can also use Java Swing to create a Digital clock.

Java Swing Program to create a Digital watch We will use the following Java packages:

1.swing package 2.awt package 3.A util package 4.The text package Algorithm* To create a frame, we must first import the swing package. Then, the util package will be used to build the user interface. We also use a text package to write the program where date-time is required. We first create a frame and define its dimensions. We then set the values of all the variables to zero and initialize the three variables Hours, Minutes, and Seconds. In this software, the Date class is used. The millisecond interval is provided by Sleep(1000)