dcsimg
Is there an Auto-Completing version of the JComboBox?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

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

Re: Is there an Auto-Completing version of the JComboBox?

Posted By:   josh_demumbreum  
Posted On:   Friday, April 26, 2002 05:47 AM

there is a solution for this in the forums for java.sun.com
About | Sitemap | Contact