2.面板的重绘

2.面板的重绘

我们要在循环中不断地描绘面板,描绘面板是通过调用paint()方法来实现的,但是不能显式地直接调用paint()方法,需要通过调用repaint()方法来调用paint()方法,实现重绘。