code: public final synchronized void removeListener(EventListener l) {
          if(l ==null) {
              throw new IllegalArgumentException("Listener " + l +
                                                 " is null");
          }
  
          // Is l on the list?
          int index = -1;
          for(int i = listeners.length-1; i>=0; i--) {
              if(listeners[i].equals(l) == true) {
                  index = i;
                  break;
              }
          }
  
          // If so,  remove it
          if(index != -1) {
              EventListener[] tmp = new EventListener[listeners.length-1];
              // Copy the list up to index
              System.arraycopy(listeners, 0, tmp, 0, index);
              // Copy from two past the index, up to
              // the end of tmp (which is two elements
              // shorter than the old list)
              if(index < tmp.length)
                  System.arraycopy(listeners, index+1, tmp, index, 
                                   tmp.length - index);
              // set the listener array to the new array or null
              listeners = (tmp.length == 0) ? EMPTY_LISTENERS : tmp;
          }
      }
docs: Remove the listener.
  @param l the listener to be removed