public synchronized void addSelectionListener(SelectionListener listener){
  if (listeners == null) {
    listeners=new Vector<SelectionListener>();
  }
  listeners.addElement(listener);
}

public synchronized void addSelectionListener ( SelectionListener listener ) { if ( listeners == null ) { listeners = new Vector < SelectionListener > ( ) ; } listeners . addElement ( listener ) ; }
add a selectionlistener to the listener list .
