I have a paintComponent method, inside a class.It makes a grid of 10*10. And I want to lower the frame rate, so that every time the function colors a rectangle in the grid,