Hi
I have a panel on my frame which you can draw something on it.and also i have a “clean” button which clean my panel completely.but I don’t know how can I do this work ?
I use netbeans .
thanks
Hi I have a panel on my frame which you can draw something on
Share
Well, this really depends on the how you have got your panel to draw. Usually, someone would override the paint method of the panel and draw the screen based on Points or other geometric elements.
To clean the panel, you would need to clear the points, and then force a redraw, using the panel’s repaint() method.
This however really depends on how you have implemented the first part of your solution. We really need more information to give a more precise answer.