how can I clean the line between two points in a panel

53 views Asked by At

Hi I have a panel that you can put some points one it and by clicking on a button ,lines will be drawn between points.also there is a button that when you click on it ,all lines will be deleted and points will be on your panel (just lines are deleted) how can I do this. is there any special method for this? thanks

I work with netbeans ,AWT

1

There are 1 answers

0
Mark Storer On BEST ANSWER

Option one: Draw the lines again, only this time in the "background color". This won't work if your background isn't a solid color.

Option two: Redraw Everything, without the lines. Not very efficient, but it really your only option if you have a complex background (text, images, etc).