check that repaint can be called from a non event dispatch thread