static void repaintIf(Component c, bool b) { if (b) c.repaint(); }