Results 1 to 2 of 2
- 08-03-2007, 06:40 AM #1Member
- Join Date
- Aug 2007
- Rep Power
Urgent-Imp-Displaying message with respect to system time
I have a table (TimeTable) in database and column name is Current time:
Table Name: TimeTable
Now My java Program should do the following:
Reading the data from the database.
And Now pick up the time from table and when the time matches with the system time
it need to trigger or dispaly a message "Hello".This should happen with all the records
in the table with respect to their time.
If i take the above database table as example:
At 3'o clock it has to display "Hello" and again 4'o clock
again it has dispaly "Hello". Like this it has to happen for the rest of the
Provide me the answers for the below questions
1)Help me with this kind of code where i can schedule and trigger the message for display.
2) The Program should run always and it should look up the system time and
display the message when ever the time occurs.
- 08-03-2007, 03:17 PM #2levent Guest
You can access your database table with JDBC.
When you initially launched your program, it will get the nearest alarm time from table and remove it from the table. You will start a timer to launch a specific event at the fetched alarm time. And after that timer is executed, you will fetch the next alarm time from database and restart a timer.
For timer functionality, check Timer class in Java SE.
- By pks in forum New To JavaReplies: 4Last Post: 05-14-2009, 04:36 AM
- By jamborta in forum AWT / SwingReplies: 6Last Post: 01-23-2008, 08:15 PM
- By Priyanka in forum Java ServletReplies: 1Last Post: 11-16-2007, 11:59 AM
- By chadscc in forum Advanced JavaReplies: 0Last Post: 11-13-2007, 04:24 PM
- By sandor in forum Web FrameworksReplies: 1Last Post: 04-11-2007, 03:10 AM