makes paint field update instead of repaint.