user472221
user472221

Reputation: 3114

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

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

Upvotes: 0

Views: 51

Answers (1)

Mark Storer
Mark Storer

Reputation: 15868

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).

Upvotes: 1

Related Questions