public void removeAll(){
  Component[] children=getComponents();
  Hashtable<Component,Integer> cToL=getComponentToLayer();
  for (int counter=children.length - 1; counter >= 0; counter--) {
    Component c=children[counter];
    if (c != null && !(c instanceof JComponent)) {
      cToL.remove(c);
    }
  }
  super.removeAll();
}

public void removeAll ( ) { Component [ ] children = getComponents ( ) ; Hashtable < Component , Integer > cToL = getComponentToLayer ( ) ; for ( int counter = children . length - 1 ; counter >= 0 ; counter -- ) { Component c = children [ counter ] ; if ( c != null && ! ( c instanceof JComponent ) ) { cToL . remove ( c ) ; } } super . removeAll ( ) ; }
removes all the components from this container .
