Here is a class inherited from java.awt.TextField, that provides the suggestions of the last typed in words like Netscape Navigator does it in it's 'Go To' field.
Because this Component is intended to be used for search engines, the suggestions are made for single words inside the text. The words are separated by blanks or by the prefixes '+' and '-' used by the Altavista search engine.
The component is freeware.
Here is a demo implementation. Each time you type return, the text will be displayed in the applets log window. Nothing else will happen, so please feel free to type some words.
Sourcecode and Demo