• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to move many balls at a time using thread

 
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
Marshal
Posts: 52581
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't. Swing is not thread‑safe. Find about the Swing Timer class.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!