How to select a drawing and delete it
1 posts in topic
Flat View  Flat View

Posted By:   Singh_Chand
Posted On:   Thursday, August 9, 2001 05:53 PM

I am drawing rectangles, lines, circles etc on a canvas in a java application.

How is it possible to select a shape and delete it? Is there any predefined class that can perform select functions like the microsoft paintbrush???

Re: How to select a drawing and delete it

Posted By:   Christopher_Schultz  
Posted On:   Friday, August 10, 2001 10:50 AM

You'll need to create classes to represent each of these things, if you want to create a 'draw' program as opposed to a 'paint' program where everything is just painted on to the canvas.

Then, when you click on the canvas, look through all the objects that have been 'drawn' to see which one the user clicked on. Then, you can do whatever you want; delete, move, re-size, etc.

Good luck,

About | Sitemap | Contact