Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

animation not animating...

 
Karen Nelson
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to do a simple animation (like in HeadStart java p 384) but the panel is not redrawing. Here is the code bit:



This code is attached to a button listener, and if I change the limit of hte loop to 1 and click the button repeatedly, everything looks fine (animated, that is). But when I do 160 steps, only the last step gets drawn (after a long pause for all the sleeps).

Any help would be greatly appreciated!
-Karen.
 
Craig Wood
Ranch Hand
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic