/** Executes to start fight animation. */ private void fight() { int result1, result2; try { // gets counts of hits for each search result1 = control.getNumberOfArticles(searchText.getText()); result2 = control.getNumberOfArticles(searchText2.getText()); // writes the html file Util.generateFight(result1, result2); // loads it in the browser browser.setUrl(new File("articlefight/articlefight.html").getAbsolutePath()); } catch (ControlException e) { } }