Use repaint from scala.swing.UIElement instead of the repaint method of a peer.