Results 1 to 2 of 2
  1. #1
    garinapavan is offline Member
    Join Date
    Aug 2007
    Rep Power

    Default 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

    CurrentTime AM AM AM AM PM

    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
    rows also.

    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.


  2. #2
    levent 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.

Similar Threads

  1. setting system clocks time
    By pks in forum New To Java
    Replies: 4
    Last Post: 05-14-2009, 03:36 AM
  2. displaying string
    By jamborta in forum AWT / Swing
    Replies: 6
    Last Post: 01-23-2008, 07:15 PM
  3. Displaying charts in a jsp
    By Priyanka in forum Java Servlet
    Replies: 1
    Last Post: 11-16-2007, 10:59 AM
  4. Images not displaying in JSP in IE7
    By chadscc in forum Advanced Java
    Replies: 0
    Last Post: 11-13-2007, 03:24 PM
  5. error message on jsp
    By sandor in forum Web Frameworks
    Replies: 1
    Last Post: 04-11-2007, 02:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts