EventListenerList listeners = getEventListenerList(); EventListener[] modListeners = listeners.getListeners(ModificationListener.class); for (int i = 0; i < modListeners.length; i++) if (modListeners[i].equals(l)) return;
  public void addModificationListener(ModificationListener l) {    getEventListenerList().add(ModificationListener.class, l);  }