How to list suggestions to when typing inside the text field

前端 未结 4 1868

Hi in my Java swing application I need to show all possible existing entries with same initial characters while user typing in a text field. Lets say user type letter \'A\'

4条回答
  •  粉色の甜心
    2020-12-06 03:59

    You could use the autocomplete package from SwingX. Google for "swingx autocomplete" if you need more real life examples, but the simplest way is creating a JComboBox and calling AutoCompleteDecorator.decorate(comboBox); on it.

提交回复
热议问题