public void removeNotify(){
synchronized (getTreeLock()) {
    ListPeer peer=(ListPeer)this.peer;
    if (peer != null) {
      selected=peer.getSelectedIndexes();
    }
    super.removeNotify();
  }
}

public void removeNotify ( ) { synchronized ( getTreeLock ( ) ) { ListPeer peer = ( ListPeer ) this . peer ; if ( peer != null ) { selected = peer . getSelectedIndexes ( ) ; } super . removeNotify ( ) ; } }
removes the peer for this list . the peer allows us to modify the list ' s appearance without changing its functionality .
