add(text);
setSize(200, 160);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setLocationRelativeTo(null);
// Create user dictionary in the current working directory of your application
SpellChecker.setUserDictionaryProvider(new FileUserDictionary());
// Load the configuration from the file dictionaries.cnf and
// use the current locale or the first language as default
SpellChecker.registerDictionaries(null, null);
// enable the spell checking on the text component with all features
SpellChecker.register(text);