• Post Reply Bookmark Topic Watch Topic
  • New Topic

i want to delete a shape on my JPanel

 
Nathalie Monvoisin
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone. i want to delete the shape i have drawn on the panel.
here is my code


can anyone tell me why it is not deleting my rectangle. thank you
 
Rob Camick
Ranch Hand
Posts: 2699
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have been given help many times on custom painting.

You have been given a link to the Swing tutorial and asked to follow the example code.

The code you posted does NOT follow the code from the tutorial.

Go back to the examples that worked and figure out what you changed.

You were given a link to that tutorial for a reason. Don't just randomly change the structure of the code. All that should change is the details of the painting code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!