public void remove(int index) { if (activeEditors.size() == 0) return; // it can get a bit excitable about removing element 0 ... PluggableEditor ed = (PluggableEditor) activeEditors.remove(index); ed.unload(); super.remove(index); }