Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Timer.schedule

  1. #1
    Junior Member
    Join Date
    Oct 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Timer.schedule

    timer.schedule isn't working for me when I use your block of code in my main method, it seems I can never get java's timer function working for me. I have been trying all afternoon, outside of a main method when I
    say "Timer timer = new Timer();" it says its correct but now inside the main method it lets me do what I wanted earlier but now what I want now which is "Timer('printer'); "
    This would all be fine if my timer.schedule would work but no
    "The method schedule(MyTask, int, int) is undefined for the type Timer" and a quick fix option is
    add cast to 'timer'.

  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Timer.schedule

    Welcome to the forums. I have moved your post to a more appropriate section, as posting to an old tutorial will not give your question much visibility. I would recommend posting code and any error messages to provide your post context.

Similar Threads

  1. How to put a timer?!?
    By mrprogrammer in forum What's Wrong With My Code?
    Replies: 7
    Last Post: August 21st, 2012, 10:44 AM
  2. how to set timer
    By jack_nutt in forum Java Theory & Questions
    Replies: 3
    Last Post: June 23rd, 2011, 08:55 PM
  3. Updating timer
    By The_Mexican in forum What's Wrong With My Code?
    Replies: 10
    Last Post: January 26th, 2011, 07:02 AM
  4. How to schedule a Java Program for Background processing
    By rangarajank in forum Java Theory & Questions
    Replies: 5
    Last Post: May 13th, 2010, 03:57 AM
  5. Timer?
    By TimW in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: October 27th, 2009, 07:43 AM