Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.11 seconds.

  1. Re: can someone show me how to change speed of an java engine.

    Like I said, the underlying implementation details of a Timer don't really matter in this context. It was not a red herring, because it was my counter-point to your insistence that threads were...
  2. Re: can someone show me how to change speed of an java engine.

    Here is a program that adjusts the speed of an animation while the simulation is running. It also prints out the name of the current thread during painting, in the timer, and in the gui code.
    ...
  3. Re: can someone show me how to change speed of an java engine.

    Wrong. He's trying to change the speed of the animation WHILE THE SIMULATION IS RUNNING, as opposed to having to stop the simulation, change a value, recompile, and restart the simulation. That can...
  4. Re: can someone show me how to change speed of an java engine.

    That doesn't matter. What do you see as the important difference between a user changing the speed and the program changing the speed? There is no reason to use extra threads in either case.


    ...
  5. Re: can someone show me how to change speed of an java engine.

    Actually, he specified the case in the very first post. Also, if you look at the other posts he has made, you'll see exactly what he's trying to accomplish. I did the research. That's not making an...
  6. Re: can someone show me how to change speed of an java engine.

    Umm okay, but that's not this case. I said a Timer was the way to go here, for stuff like this, in this case. Threading has its own merits, but not here. And note that a Swing Timer does not have to...
  7. Re: can someone show me how to change speed of an java engine.

    The advantage of the Swing Timer is that you don't have to worry about things like the EDT, and actions such as pausing between steps are done at a higher level. I don't know what you mean about...
  8. Re: can someone show me how to change speed of an java engine.

    I absolutely disagree with this advice. Using a Swing Timer is the way to go here.
  9. Re: can someone show me how to change speed of an java engine.

    You already do change the speed of the Timer, in the setSpeed() method. What's your question?
Results 1 to 9 of 9