File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes Check for time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Check for time" Watch "Check for time" New topic

Check for time


Joined: Jan 08, 2005
Posts: 1
hi there,
I'm doing a calendar. And this calendar allows users to enter events as reminder. They will key in the details and more importantly the time to activate the reminder.
So was think how do i code so when the application is running, it will keep checking on the phone time against the scheduled time.
Tomas Conway
Ranch Hand

Joined: Nov 02, 2004
Posts: 45
Use the Timer and TimerTask classes (in java.util).

You can schedule a task to be run periodically. That task can check the current time against the scheduled time and do whatever is required at the scheduled time.

Alternatively (and probably a better solution) you can schedule your task to be run at the specified time.
[ January 09, 2005: Message edited by: Tomas Conway ]
Michael Yuan
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
ice ice,

Please change your display name to conform to the JavaRanch naming policy, which you had agreed to when you signed up.

Michael (the moderator)

Seam Framework:
I agree. Here's the link:
subject: Check for time
Similar Threads
Need a program in timer schedule..
Custom Cell Renderer for JTable
Reminder: Please always mention the source of any mock exam question you post.
Reminder: Position on posting real questions and requests for braindumps
Hat on moose??