Results 1 to 11 of 11
Like Tree1Likes
  • 1 Post By sunde887

Thread: timer

  1. #1
    Ashish_jain's Avatar
    Ashish_jain is offline Member
    Join Date
    Jun 2011
    Posts
    32
    Rep Power
    0

    Unhappy timer

    java.lang.IllegalStateException: Task already scheduled or cancelled

  2. #2
    Ashish_jain's Avatar
    Ashish_jain is offline Member
    Join Date
    Jun 2011
    Posts
    32
    Rep Power
    0

    Default

    any one have idea to change bubble axis acoording to timer.schedule(this,1000,3000) because it continuously minus(--) x axis.

  3. #3
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,038
    Rep Power
    10

    Default

    You haven't provided any code or any context at all, so it's going to be pretty hard to help you. Check out the link in my signature about asking smart questions, post an SSCCE (NOT your whole project), and we'll go from there.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  4. #4
    Ashish_jain's Avatar
    Ashish_jain is offline Member
    Join Date
    Jun 2011
    Posts
    32
    Rep Power
    0

    Default

    Actually i want to minus bubble axis by using timer.schedule.
    public void position() {//Change X axis According fixed time
    m_pTimerTask.CTimerTask1();//call method
    }

    public void CTimerTask1() {
    m_pTimer.schedule(m_pTimerTask,2000,5000);
    }

  5. #5
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,883
    Rep Power
    25

    Default

    Where/what line in your code is generating the exception?

    Your posted code doesn't really show anything useful for debugging.
    Please use code tags when posting code. Use the # icon. See: BB Code List - Java Forums

  6. #6
    Ashish_jain's Avatar
    Ashish_jain is offline Member
    Join Date
    Jun 2011
    Posts
    32
    Rep Power
    0

    Default

    when i run application.

  7. #7
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,883
    Rep Power
    25

    Default

    when i run application
    Yes, I assume it happens during execution, not when compiling.
    Where/what line in your code is generating the exception?

  8. #8
    Ashish_jain's Avatar
    Ashish_jain is offline Member
    Join Date
    Jun 2011
    Posts
    32
    Rep Power
    0

    Unhappy timer and timer task

    i m developing bubble game so i have to change bubble Axis with fixed interval of time ex-(1 min.)and i using timer.schedule().so how can i use this concept.plz tell me.

  9. #9
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    You seem to be hiding information from us for some reason -- is this supposed to be a test of our mind-reading abilities or do you really have a question that you want to have answered. If the latter, then you'll probably want to provide enough information to allow the question to be answered. Please have a look at the "how to ask smart questions" link in my signature links below for some useful tips.

  10. #10
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    You need to change the line of code that is causing the exception. That's about as helpful as someone can be with what little you have given us.
    KevinWorkman likes this.

  11. #11
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,800
    Rep Power
    7

    Default

    I have no idea what OP is bubbling errrr babbling on about!

Similar Threads

  1. Stopping a Timer from Inside the timer
    By krishnan in forum Java Applets
    Replies: 2
    Last Post: 10-05-2010, 12:15 AM
  2. Need help with timer
    By firecat318 in forum New To Java
    Replies: 6
    Last Post: 05-31-2010, 03:38 AM
  3. EJB Timer
    By mrjunsy in forum Advanced Java
    Replies: 0
    Last Post: 08-22-2008, 05:09 PM
  4. EJB Timer
    By mrjunsy in forum New To Java
    Replies: 0
    Last Post: 08-04-2008, 07:47 PM
  5. Replies: 0
    Last Post: 04-04-2008, 03:46 PM

Posting Permissions

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