Clear the Applet screen

How can I clear an Applet screen:
I have a list of buttons. Each time I press a button, I want to clear the screen and put new buttons on.
I don't have a paint function.
How do I do it?
What function can I use to clear the screen before painting it again??
osnatAsked:
Who is Participating?
 
omokConnect With a Mentor Commented:
Applet is a subclass of Container object.
Use getComponents() to get all components inside the Applet, then remove(Component) each of the components.
Hope this helps.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.