java - 如何设置 Jcombobox 的智能

标签 java swing autocomplete jcombobox

在 Jcombobox 中,当我输入一些字母(例如“j”)时,默认情况下会聚焦第一个以“j”开头的项目。但是相同的逻辑不适用于许多字母(例如“ji”)。如何当我输入“ji”时,它应该关注以“ji”开头的第一个项目,依此类推?

最佳答案

In Jcombobox when i type some letter say ('j'),the first item that starts with 'j' will be focussed by default.But the same logic is not applicable with many letters(say 'ji').How to make it possible in such a way that when i type 'ji' it should focus onto the first item that starts with 'ji' and so on.

参见AutoComplete JComboBox / JTextField

关于java - 如何设置 Jcombobox 的智能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16730677/

相关文章:

CSS 自动完成字体大小

java - 启动过滤器 struts2 时出现异常 无法加载配置。文档根元素 "package",必须与 DOCTYPE 根 "struts"匹配

jquery - 通过对象数组的多个值过滤 Jquery AutoComplete

javascript - 无效值错误 : initAutocomplete is not a function Google Places and Autocomplete API

java - 如何在 JTextPane 中显示 Applet

java - 我如何正确对齐此文本?

java - 通过代码处理 JDialog,不要让用户关闭它

java - 清除 Android 3.x 上的图案锁定

java - 如何从扫描仪中删除分隔符恢复? ( java )

java - Jackson 无法反序列化通过 REST 传递的 MongoDB 对象