void (String name, Component component) { synchronized (component.getTreeLock()) { if (name == null || TOP.equalsIgnoreCase(name)) { myTop.add(component); } else if (CENTER.equalsIgnoreCase(name)) { myCenter.add(component); } else if (BOTTOM.equalsIgnoreCase(name)) { myBottom.add(component); } else { throw new IllegalArgumentException("unsupported name: " + name); } } }