public void removeLayoutComponent(Component comp){
synchronized (comp.getTreeLock()) {
    for (int i=0; i < vector.size(); i++) {
      if (((Card)vector.get(i)).comp == comp) {
        if (comp.isVisible() && (comp.getParent() != null)) {
          next(comp.getParent());
        }
        vector.remove(i);
        if (currentCard > i) {
          currentCard--;
        }
        break;
      }
    }
  }
}

public void removeLayoutComponent ( Component comp ) { synchronized ( comp . getTreeLock ( ) ) { for ( int i = 0 ; i < vector . size ( ) ; i ++ ) { if ( ( ( Card ) vector . get ( i ) ) . comp == comp ) { if ( comp . isVisible ( ) && ( comp . getParent ( ) != null ) ) { next ( comp . getParent ( ) ) ; } vector . remove ( i ) ; if ( currentCard > i ) { currentCard -- ; } break ; } } } }
removes the specified component from the layout . if the card was visible on top , the next card underneath it is shown .
