Link to home
Start Free TrialLog in
Avatar of wrynn
wrynn

asked on

how do i clear all the shapes i've drawn on a panel using the graphics2d object?

how do i clear all the shapes i've drawn on a panel using the graphics2d object?
Avatar of for_yan
for_yan
Flag of United States of America image

You can say clear Rect over the whole compouonent
ASKER CERTIFIED SOLUTION
Avatar of for_yan
for_yan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wrynn
wrynn

ASKER

I figured out that I had to draw a white rectangle over the entire screen at the beginning of my paint method.
I've requested that this question be closed as follows:

Accepted answer: 0 points for wrynn's comment #36156857

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
I think three comments should be considered to be a solution
ID: 34940178 (166 points)
ID: 34940229 (166 points)
ID: 34940446 (166 points)

Any one of these can be considered as an accepted solution, the other two
are assisted solution

The comment by wrynn  ID: 36156857
in fact repeats the solution which was mentioned above
Fine with giving points to experts.  The solution used by the asker is not the same as the suggestions by for_yan, hence the original assignment to the asker.  But experts worked at it, so giving points to them is fine.  The first answer from objects is the correct one, but not what the asker used, so hard to say here.