public void loadFromFile(String sFileName) throws FileNotFoundException, IOException {
  FileReader frFile=new FileReader(sFileName);
  String sText="";
  int c=frFile.read();
  while (c != -1) {
    sText+=c;
    c=frFile.read();
  }
  addText(sText);
  frFile.close();
}

public void loadFromFile ( String sFileName ) throws FileNotFoundException , IOException { FileReader frFile = new FileReader ( sFileName ) ; String sText = "" ; int c = frFile . read ( ) ; while ( c != - 1 ) { sText += c ; c = frFile . read ( ) ; } addText ( sText ) ; frFile . close ( ) ; }
loads a text file with filename sfilename and adds all its words to the definitions
