question: 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 ) ; }
target:  Clear the list and fill it with the current search result and favorites. Also update the status text.