public void addMovieSet(MovieSet movieSet){
synchronized (root) {
    MovieSetTreeNode child=new MovieSetTreeNode(movieSet);
    nodeMap.put(movieSet,child);
    root.add(child);
    root.sort();
    int index=root.getIndex(child);
    TreeModelEvent event=new TreeModelEvent(this,root.getPath(),new int[]{index},new Object[]{child});
    for (    TreeModelListener listener : listeners) {
      listener.treeNodesInserted(event);
    }
  }
  movieSet.addPropertyChangeListener(propertyChangeListener);
}

public void addMovieSet ( MovieSet movieSet ) { synchronized ( root ) { MovieSetTreeNode child = new MovieSetTreeNode ( movieSet ) ; nodeMap . put ( movieSet , child ) ; root . add ( child ) ; root . sort ( ) ; int index = root . getIndex ( child ) ; TreeModelEvent event = new TreeModelEvent ( this , root . getPath ( ) , new int [ ] { index } , new Object [ ] { child } ) ; for ( TreeModelListener listener : listeners ) { listener . treeNodesInserted ( event ) ; } } movieSet . addPropertyChangeListener ( propertyChangeListener ) ; }
adds the movie set .
