One suggestion: write this as at least two classes. One to do the word counting, and one to present the results in a GUI. Smaller, more focused classes are easier to write, to understand, to
test, and to debug.
An array isn't the best choice of data structure. A better one might be a Map, using the words for keys, which makes looking up the words and finding if they've been used quick and easy.
Breaking the
string into words yourself, again, isn't the best choice, when you can use either java.util.StringTokenizer or java.io.StreamTokenizer to do it for you.
If this is an assignment, where you are required to do this a certain way, then let us know; otherwise, I can give you more advice regarding the above.