Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.14 seconds.

  1. Re: Better solution for moving my rectangle? (simple game)

    I'm not sure what you mean by that. Calling repaint() simply tells the component to paint itself using paintComponent(). So you override paintComponent to display a frame of your game.

    Then every...
  2. Re: Better solution for moving my rectangle? (simple game)

    Sounds good to me. And it sounds like you should be using a Swing Timer. Every time the Timer fires (30 seconds a second is a reasonable framerate), just check the location of the rectangle and...
  3. Re: Better solution for moving my rectangle? (simple game)

    I'm not really sure what the question is. Does this work? Where is your SSCCE? What do you mean by "better"?

    I would use a Swing Timer instead of threading.
Results 1 to 3 of 3