private void update(){
  listData.clear();
  for (  String game : searchResult) {
    listData.addElement(game);
  }
  if (!searchResult.isEmpty() && !favorites.isEmpty()) {
    listData.addElement("-");
  }
  for (  String game : favorites) {
    listData.addElement(game);
  }
  searchResultInfo.setText("Search: " + searchResult.size() + " / "+ "Favorites: "+ favorites.size()+ "");
  list.setSelectedValue(gameInput.getText(),false);
}

private void update ( ) { listData . clear ( ) ; for ( String game : searchResult ) { listData . addElement ( game ) ; } if ( ! searchResult . isEmpty ( ) && ! favorites . isEmpty ( ) ) { listData . addElement ( "-" ) ; } for ( String game : favorites ) { listData . addElement ( game ) ; } searchResultInfo . setText ( "Search: " + searchResult . size ( ) + " / " + "Favorites: " + favorites . size ( ) + "" ) ; list . setSelectedValue ( gameInput . getText ( ) , false ) ; }
clear the list and fill it with the current search result and favorites . also update the status text .
