Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with java paint  RSS feed

 
benq borg
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have the program below. I want to draw MULTIPLE circles where the user clicks the mouse (after hitting the Node Button @ south) but everytime it repaints the preivous circle is deleted. I want to continue drawing circles without deleting the previos one ... anyone know how I can edit the code so I can achieve my purpose.

I am a beginner in java so please dont include very difficult stuff unless its explained. Thanks alot for your patience.

The code is the following:

 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My suggestion would be to use a Collection to hold the circles to be drawn. Then in the paint method, simply iterate through the Collection.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!