svoid addAndRepaint(Container c, Component x) { if (c != null && x != null) swing { c.add(x); c.repaint(); } }