for (int i = count - 1; i >= index; i--)
peer.delItem(i);
item.addNotify();
peer.addItem(item);
// bear in mind that count is the number of items *before* the new
// item was added
for (int i = index + 1; i <= count; i++)
peer.addItem((MenuItem) items.elementAt(i));