sjeevan
November 5th, 1999, 12:58 AM
Hi,
I need to show a label, in my Java application, which will display the current time.
It would also automatically update it self as the time changes.
In C (Windows SDK) / VB, this could be acheived by having/ creating a timer event/ control and
when ever the timer event is received by the application, the text displayed in the label, updated.
But how could it be done in Java. ?
The details of displaying time, using java.util.GregorianCalendar
are simple,
but how/ when to keep updating the label, constantly, during the life of the application.
Would an example be available, somewhere, too ?
regards
Jeevan
I need to show a label, in my Java application, which will display the current time.
It would also automatically update it self as the time changes.
In C (Windows SDK) / VB, this could be acheived by having/ creating a timer event/ control and
when ever the timer event is received by the application, the text displayed in the label, updated.
But how could it be done in Java. ?
The details of displaying time, using java.util.GregorianCalendar
are simple,
but how/ when to keep updating the label, constantly, during the life of the application.
Would an example be available, somewhere, too ?
regards
Jeevan