public void removeAllElements(){
synchronized (scanResults) {
    scanResults.clear();
    fireTableDataChanged();
  }
}

public void removeAllElements ( ) { synchronized ( scanResults ) { scanResults . clear ( ) ; fireTableDataChanged ( ) ; } }
removes all the elements . method is synchronized internally .
