Question

My Java application gives user a textbox to input some String data.Domain size of input is around 500 words. I want to give suggestion when user starts typing a word. Something Like Google Automatic suggestion. Any idea how to do that?

Was it helpful?

Solution

Here is an example of how to do it:

http://www.java2s.com/Code/Java/Swing-JFC/AutocompleteTextField.htm

When you create an instance of this autocomplete textfield you have to pass your 500 words in there as a list.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top