Reputation: 56229
How to add suggestion list ( when user type part of some word to suggest list of all tokens which starts with that part, something like intellisense in Eclipse ) to JEditorPane ? I have implemented method which returns ArrayList of strings but how to show that ?
Upvotes: 2
Views: 501
Reputation: 27326
I would advise you to use the open source Jide common layer, particularly the AutoCompletion helper class.
It works with a lot of swing components, with or without a list of possibilities being shown. Highly recommended.
Upvotes: 1
Reputation: 458
javax.swing.JPopupMenu may help u...
for every keyReleasedEvent pass the substring to your method..
for each suggested string javax.swing.AbstractAction should be created..
I hope it helps...
Upvotes: 1