if (model.size() == 0 && getAddAction().isEnabled()) { getAddAction().actionPerformed(null);
if (!localComponents.contains(e.getOppositeComponent())) { commit();
    public void focusLost(FocusEvent e) {        // for inexperienced users...        if (model.size() == 0 && getAddAction().isEnabled()) {                getAddAction().actionPerformed(null);        }    }