I have an Applet that has three buttons on it, one being a clear screen button. I have it setup right now so it draws a rectangle the size of the applet and fills it with the background color. But when it does that my other two buttons disappear until I mouse over them again. Is there a better way to clear screen or anyway for the buttons to show back up after the "clear screen"?
I changed the name of the method from Paint(raphics g) to paintComponent(Graphics g) along with the editions I mentioned earlier and when I click Clear Screen the Red and Black buttons do not go away, but now I cant draw on the Panel. Any ideas why?
author and iconoclast
I was told to "do the drawing in that JPanel's paintComponent() method" so I thought that is what I did. I dont have any examples of this so im kinda taking a shot in the dark when trying to implement the suggestions I get. If I call super.paintComponent() then I get an erros that says cannot find symbol.