Results 1 to 2 of 2

Thread: paintComponent

  1. #1
    zock70 is offline Member
    Join Date
    Nov 2011
    Rep Power

    Talking paintComponent

    Hey everyone, I'm making a Tower Defense game.
    I'm in the process of making animations for the towers, and I need the "bullets" to be repainted often, so that they have the appearance of being shot.
    Anybody know how best to do this?
    ~~Thanks, Zock70

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Rep Power

    Default Re: paintComponent

    Use a Timer to schedule the animation of the bullet moving. Every time the Timer fires you change the coordinates of the bullet and repaint the bullet.

Similar Threads

  1. PaintComponent not working
    By ingy489 in forum AWT / Swing
    Replies: 6
    Last Post: 11-10-2011, 07:49 PM
  2. Help with paintComponent!
    By joeyea in forum Java 2D
    Replies: 6
    Last Post: 12-27-2010, 01:59 PM
  3. JPanel PaintComponent
    By capiono in forum AWT / Swing
    Replies: 5
    Last Post: 10-31-2010, 02:36 AM
  4. paintComponent vs paintComponents
    By alacn in forum New To Java
    Replies: 5
    Last Post: 07-26-2010, 03:33 AM
  5. paint() and paintComponent()
    By goldhouse in forum Java 2D
    Replies: 1
    Last Post: 07-17-2007, 03:43 AM

Posting Permissions

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