Results 1 to 10 of 10

Thread: adding a timer?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    226

    adding a timer?

    i try searching but either im not getting it or something is right, so here i am asking how can i add a timer to my java program

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: adding a timer?

    you can use javax.swing.Timer or java.util.Timer
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    226

    Re: adding a timer?

    Quote Originally Posted by ComputerJy
    you can use javax.swing.Timer or java.util.Timer
    can you explain alittle better plz? because i saw that but i dont understand some of it

  4. #4
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: adding a timer?

    I think it'd be a better idea to check out what sun has to say about the swing timers
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    226

    Re: adding a timer?

    Quote Originally Posted by ComputerJy
    I think it'd be a better idea to check out what sun has to say about the swing timers
    i read that but
    Code:
    timer = new Timer(speed, this);
    what is this? and i dont mean this line of code but the word "this" after speed

  6. #6
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: adding a timer?

    That section is clearly taken from this file
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    226

    Re: adding a timer?

    Quote Originally Posted by ComputerJy
    That section is clearly taken from this file
    that still doesnt tell me what
    Code:
    timer = new Timer(speed, this);
    that this mean

  8. #8
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: adding a timer?

    it's a reference to the current class instance :S
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    226

    Re: adding a timer?

    Quote Originally Posted by ComputerJy
    it's a reference to the current class instance :S
    what can u replace this with?

  10. #10
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: adding a timer?

    I'm gonna unsubscribe from this thread for now.
    I really think you should read a java introduction book
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

Posting Permissions

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



Click Here to Expand Forum to Full Width