Skip to main content

How to display Current time and date in the form(Like ticker)

1 reply [Last post]
Joined: 2009-02-18

Hi all,
I am a newbie to java and j2me application development.
I need to display date and time in my form. So, I used this line to display the date and time and applied it to the Label.
java.util.Date now=java.util.Calendar.getInstance().getTime();
This sets the date and time to the label on load of the form.

But, I want to change it dynamically with the current time(like ticker, label should automatically been updated with current time and displayed).

Please help me out.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-09-01

U can try and assign a thread to call the same function every 1000 ms.