List suggestions = event.getSuggestions(); for (Iterator suggestedWord=suggestions.iterator(); suggestedWord.hasNext();) { System.out.println("Suggested Word: ="+suggestedWord.next()); }
List suggestions = event.getSuggestions(); if (suggestions.size() > 0) { System.out.println("MISSPELT WORD: "+event.getInvalidWord()); for (Iterator suggestedWord=suggestions.iterator(); suggestedWord.hasNext();) { System.out.println("\tSuggested Word: "+suggestedWord.next()); } } else { System.out.println("MISSPELT WORD: "+ event.getInvalidWord()); System.out.println("\tNo suggestions"); }
  public void spellingError(SpellCheckEvent event) {    List suggestions = event.getSuggestions();    for (Iterator suggestedWord=suggestions.iterator(); suggestedWord.hasNext();) {      System.out.println("Suggested Word: ="+suggestedWord.next());    }    //Null actions  }