Problem solved? No.
This eliminates most of the flicker, but what if we increase the size and complexity of the object we are drawing?
Let�s change the dimensions of the ball and see what happens.
. . . On a slow system, the drawing of the ball tends to flicker with our gray background. This becomes more pronounced as we increase the complexity of the paint methods code.