Posted By:
Thomas_Rynne
Posted On:
Wednesday, April 24, 2002 11:38 AM
I have a JComboBox with 500 elements. I would like to use an editable JComboBox which scrolls to the element matching the text entered so far. I have seen this functionality in other toolkits but can't find it in Swing. I began writing one myself but feel I'm wasting my time as there must be one out there somewhere. However, I don't know what this kind of widget is called. If I do need to implement it myself, is there any way I get events from the JComboBoxEditor as the text is modified, rather than when the text is completed? My current version uses an normal (non-editable) JComboBox and does its own char to index conversion, keeping a stack of the last keys pressed. The trouble at the momen
More>>
I have a
JComboBox
with 500 elements. I would like to use an editable
JComboBox
which scrolls to the element matching the text entered so far. I have seen this functionality in other toolkits but can't find it in Swing.
I began writing one myself but feel I'm wasting my time as there must be one out there somewhere. However, I don't know what this kind of widget is called.
If I do need to implement it myself, is there any way I get events from the
JComboBoxEditor
as the text is modified, rather than when the text is completed? My current version uses an normal (non-editable)
JComboBox
and does its own char to index conversion, keeping a stack of the last keys pressed. The trouble at the moment is you can't see the charaterters you've entered.
<<Less