It takes a text file as input and outputs all the words in that file in alphabetical order, one word per line, ignoring duplicates. [cc lang=”java” tab_size=”2″ lines=”105″] import java.io.*; import java.util.*; public class Dictionary { public static void main(String[] args) { try{ FileReader fr = new FileReader(“words.txt”); BufferedReader br = new BufferedReader(fr); String s;…
Month: April 2015
Java – How to add a spell checker to Swing GUI text components JOrtho Library and Wikitionary Dictionaries
This tutorial uses JOrtho, a Java based spell checker, to implement a spell checker in a Swing based application. We are going to use an English dictionary throughout this guide, though other languages are available by downloading your language dictionary from http://www.wiktionary.org/ JOrtho (Java Orthography) is an Open Source spell-checker entirely written in Java. Its…