Visit http://source-codes.blogspot.com/ for more programmes like, Thambola, Housie, Love Calculator, Friendship Calculator, FLAMES, Animations, Digital Number, Sudoku.java, Clock Field. - Java.
This is new Java Field just like other, TextField, labels or any UI objects. This Clock field extends the JLabel component and has all the functionality of a label with added functionality of displaying the time in different fashions like
HH:MM:SS AM/PM LOCALE HH:MM AM/PM HH:MM:SS AM/PM HH:MM ( 24hr Clock ) HH:MM:SS ( 24hr Clock with Seconds )
As it is extended from JLabel, we can change the font, size of the label, background, foreground and etc. etc.
Its usage is also very simple like JLabel, creating an object of ClockField and adding it to the Panel in the UI, and setting its bounds ( to place it at our convinient place ).
To start the clock tickering, just call the function "showClock" of ClockField.
Now it Starts...
Download the ClockField.java and Test.java Source code for free here..
To Test the Program, Read the ReadMe.txt given with Sourcecode.
Below are some screen shots depicting the above explanation :P
 Different Clock Styles  HH:MM:SS AM/PM LOCALE Started.  All Different Styles of Displaying Started... Give Feedback for Improvement.
|