This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply 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: 1788
    
    2
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
 
Similar Threads
Rotating a JWindow with multiple JPanels
Simple Gui Question (Head First Java)
using a bean to put slider on panel
Matisse designer_problem with displaying drawn circle at JPanel/also animation problem
help me it is a simple code but i need help