public void removeAll(){
  m_nodes.clear();
  m_lines.clear();
  Component[] components=getComponents();
  for (int i=0; i < components.length; i++) {
    Component component=components[i];
    component.removeMouseListener(this);
    component.removeMouseMotionListener(this);
  }
  super.removeAll();
}

public void removeAll ( ) { m_nodes . clear ( ) ; m_lines . clear ( ) ; Component [ ] components = getComponents ( ) ; for ( int i = 0 ; i < components . length ; i ++ ) { Component component = components [ i ] ; component . removeMouseListener ( this ) ; component . removeMouseMotionListener ( this ) ; } super . removeAll ( ) ; }
remove all and their listeners
