static void addOrRemoveComponent(bool add, Container a, Component b) { if (add) addToContainer(a, b); else removeFromContainer(a, b); }