Posts which you will also like.

Wednesday, September 7, 2011

A Tutorial on Creating Digital Clock In Java Using Threads

In this example I created a live digital clock in Java using SWING and THREAD classes.There are two many methods to create this and I chose the one in which I extended the Jlabel class which shows the current time with the help of Threads.
Next I added a JLabel to the JPanel and instantiated my custom JLabel class and gave its reference to the label that was added to JPanel.

The image below shows the outcome of the code:


Download source code :LiveClock.rar

More on this at

No comments:

Post a Comment

Your comment may wait for moderation.... Protected by Copyscape Online Plagiarism Tool