JComboBox with a keylistener

How r ya?

I have a JComboBox with a long list of (sorted) variable names. Because of the length of the list the user should be able to approx. jump to the variable by entering the first couple of letters??  I know we see examples of this everyday in computer apps, but how do i do this in Java??
 Is it much more difficult to implement "the first few letter" than "the first letter" ??
cathalmchaleAsked:
Who is Participating?
 
TimYatesCommented:
0
 
TimYatesCommented:
is a full example with source code :-)
0
 
ozymandiasCommented:
You probably need to subclass JComboBox and add a keystroke listener that captures the keystrokes and concaten\ates them into a string and filters/selects the combobox contents accordingly.
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
ozymandiasCommented:
...or find someone who's already done it....:)
0
 
TimYatesCommented:
That link I gave is a very clean implementation of it all..based on PlainDocument in an editable JComboBox :-)

;-)
0
 
cathalmchaleAuthor Commented:
Perfect, and answered in 1 reply!!
Thanks
0
 
TimYatesCommented:
I saw it the other day on JavaLobby, so it was stuck in my head as being quite cool :-)

Good luck with it!!

Tim
0
 
guyneoCommented:
I am also looking for exactly this.  However the link http://www.orbital-computer.de/JComboBox/ is broken.
Can you guys please give me the link to this on java lobby site or post the code?
thanks
0
 
TimYatesCommented:
For 0 points?
0
 
guyneoCommented:
sorry. I am new to this site. How can I give points on this question that has been accepted?  Is there a way? Or should I post this as a new question? how will it come to your attention when I post this as a new question?
please let me know.
thanks
0
 
TimYatesCommented:
Sorry...was grumpy this morning

For future reference, you can "Ask related question" (above the comment entry box) and the original people get notified

The best I can come up with, with that site being down is:

http://www.google.co.uk/search?hl=en&q=http%3A%2F%2Fwww.orbital-computer.de%2FJComboBox%2F&btnG=Google+Search&meta=&aq=f&oq=

Ignore the first result, but the others seem to be copies of the original code
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.