0

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

skaffman
  • 398,947
  • 96
  • 818
  • 769
user472221
  • 3,014
  • 11
  • 35
  • 42

1 Answers1

1

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

Mark Storer
  • 15,672
  • 3
  • 42
  • 80