when i run the program it shows painter is not active
how do you see that the painter is not active? what do you meant "it shows painter is not active"?