public synchronized void addPropertyChangeListener(PropertyChangeListener listener){
  if (listenerList == null) {
    listenerList=new Vector<PropertyChangeListener>();
  }
  listenerList.add(listener);
}

public synchronized void addPropertyChangeListener ( PropertyChangeListener listener ) { if ( listenerList == null ) { listenerList = new Vector < PropertyChangeListener > ( ) ; } listenerList . add ( listener ) ; }
registers propertychangelistener to receive events .
