typeable的JComboBox [英] typeable JComboBox
问题描述
我相信这已经问,但我不能找到它(也许我不知道如何寻找的话)。
I am sure this has been asked but I can't find it (maybe I don't know how to search for it).
我有一个的JComboBox
有很多价值,所以通过浏览所有这些是痛苦的。我想它改变其选择的浏览器的方式做:当你键入的第一个字母,说取值
,它会选择先从的第一个元素小号
,然后如果你快速输入第二个字母,说 A
,选择将改变到以的第一个元素SA
,等等。
I have a JComboBox
with lots of values, so navigating through all of them is painful. I would like it to change its selection the way browsers do: when you type the first letter, say s
, it would select the first element starting with s
, then if you quickly type the second letter, say a
, the selection would change to the first element starting with sa
, and so on.
只是一个透明的,typeable的JComboBox
,而不是的JTextField
你开始然后键入一个下拉选项显示出来。
Just a transparent, "typeable" JComboBox
, not a JTextField
where you start typing then a pull-down of options shows up.
推荐答案
另一种选择是由装饰 SwingX
这篇关于typeable的JComboBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!