Results 1 to 4 of 4
  1. #1
    Mba7eth is offline Member
    Join Date
    Sep 2008
    Posts
    4
    Rep Power
    0

    Default same animation speed regardless of how power full the PC is.

    how can i control the animation speed..... regardless of how powerful the PC is.

  2. #2
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Default

    Timer and TimerTask
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

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

    Default

    If you are using Swing, then you would use a Swing Timer and not util Timer with TimerTask. The key to either of these, is to calculate the position of your sprite based on the current system's time which I think is easiest obtained with System.currentTimeMillis()

  4. #4
    Mba7eth is offline Member
    Join Date
    Sep 2008
    Posts
    4
    Rep Power
    0

    Default

    Thanks alot
    i just google it and i got some good links about swingtimer
    Last edited by Mba7eth; 09-16-2008 at 12:57 PM.

Similar Threads

  1. Power of Java
    By jeffranc in forum JDBC
    Replies: 5
    Last Post: 09-05-2008, 08:14 AM
  2. Power*MatchMaker 0.9.2
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 11-27-2007, 09:21 PM
  3. Power*Architect 0.9.7
    By levent in forum Java Software
    Replies: 0
    Last Post: 07-31-2007, 07:52 PM
  4. Power*Architect 0.9.6
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 07-07-2007, 03:25 PM
  5. compare speed
    By bbq in forum JDBC
    Replies: 1
    Last Post: 06-28-2007, 06:34 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
  •