• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

frame lefted unpainted after being covered with other window

 
Petar Thomas
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2536
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic