Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to move many balls at a time using thread  RSS feed

 
Preethi sakar
Greenhorn
Posts: 19
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am try to move 2 ball at same time in different position but only one ball is display.

Can any one tell solution for that??

Here is my code
I used two class one extends JPanel and another for JFrame




 
Campbell Ritchie
Sheriff
Posts: 53750
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't. Swing is not thread‑safe. Find about the Swing Timer class.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!