paint()是基础,paint中会调用 paintComponent(), paintBorder(), paintChildren() 这三个方法, 这三个方法一个是绘制背景,一个绘制边框,一个绘制子控件。 一般重写背景,是建议重写paintComponent()的。