I’m interested in providing an autocompletion box in a JFrame. The triggering mechanism will be based on mnemonics (I think), but I’m not really sure what to use for the “autocompletion box” (I would like results to be filtered as the user presses keys).
How would you implement this? Some sort of JFrame, or a JPopupMenu?
I would like to know how this is implemented, so please don’t post links to available [J]Components.
There is an example for auto-completion for text area at
Sun’s tutorials “Using Swing Components”.
It is done in the style of word processors (no pop ups, but the
suggested text is typed ahead of the cursor).
Just scroll down to “Another Example: TextAreaDemo”
ant hit the Launch button!