background, foregroud?
去掉 this.repaint(), 没有必要.
TextArea 是变量么?Java 中有个 class 叫 TextArea .建议换别的名字,Java 变量名一般第一字母小写。