How to show autocomplete as I type in JTextArea?

早过忘川 提交于 2020-12-25 00:47:04

问题


I need to show suggestions (autocomplete) as the user types in a JTextArea, kind of like cell phone T9.

I don't know how to do this in myTextAreaKeyTyped() event.

This app is a typing helper. It shows variants of characters non-present on the keyboard. E.G. You press 'A', it shows Â:1, Á:2 ,À:3… 'A' will be replaced if you press 1,2 or 3. It's already done, but the variants are shown in a JLabel at the bottom of my JFrame, because I don't know how to do this.

Can you please help me out? Thanks in advance.

来源:https://stackoverflow.com/questions/10873748/how-to-show-autocomplete-as-i-type-in-jtextarea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!