Entering JComboBox selections using multiple key strokes.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Tim_Scott
Posted On:   Tuesday, July 8, 2003 11:12 AM

I am attempting to use a JComboBox for selecting from a list of several thousand items. I would like the capability where if a user types 'SC' the JComboBox jumps to the first item in the list starting with 'SC' rather than going to the first S and then the first C. The data is initially populated from a database.




Thanks for any help

Re: Entering JComboBox selections using multiple key strokes.

Posted By:   Stephen_Smith  
Posted On:   Wednesday, July 9, 2003 04:29 AM

There's an easy answer - implement a JComboBox.KeySelectionManager. Just about every Swing book contains an example of a KeySelectionManager - the O'Reilly Swing book, for example. If you can't find any code, I can supply some.
About | Sitemap | Contact