aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes frame lefted unpainted after being covered with other window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "frame lefted unpainted after being covered with other window" Watch "frame lefted unpainted after being covered with other window" New topic
Author

frame lefted unpainted after being covered with other window

Petar Thomas
Ranch Hand

Joined: Oct 11, 2009
Posts: 234
Hi.. I hope the topic title makes sense. I have a small question.

It is an ordinary code. When I cover my frame with some other window, the circle doesn't get repainted, unless I resize a window. The JLabel "Felix" gets repainted. How can I make the circle gets repainted as well, in case when another window covers the frame, and when moved away, that place is not repainted with a circle?

Thank You for help


Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2227
    
    8
You should NOT override the paint() method of a JFrame.

Read the Swing tutorial on Custom Painting for the proper way to do this.
Petar Thomas
Ranch Hand

Joined: Oct 11, 2009
Posts: 234
Thank You
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: frame lefted unpainted after being covered with other window