You have every right to take the hard road, but at least you could remove the inane commencts and make your code shorter for posting.

Fernando Piovani
Greenhorn

Joined: Feb 09, 2011
Posts: 10

posted Aug 30, 2011 15:00:53

0

Maneesh Godbole wrote:Most probably you are missing the call to super.paintComponent()
If that doesn't fix the problem post your SSCCE code like Campbell suggested.

Yeah, that definitely works. I dont yet understand how and why but its ok... Still, resizing cause the program to reload all drawing, and since i've been working with a huge amout of data it take several time to resize (when growing to larger dimen. ).

My question is:

Why, when i resize to a smaller dimensions didnt reload the drawing process and how does exactly super.paintComponent() works on this matter?

In that case, this is a performance problem and you should follow what is mentioned in the tutorial:
"To keep our custom painting as efficient as possible, we will track the mouse coordinates and repaint only the areas of the screen that have changed. This is a recommended best practice that will keep your application running as efficiently as possible. "