File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to search in a JComboBox

 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
Hi,
I would like to know how to use the KeyListener in the JComboBox.
You should be able to start typing in an editable JComboBox and everytime a key is typed you should select the entered element or the closest one. (please include example)
Thanks,
Jelle
 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
I have been wanting to do the same thing. Did you find a solution?
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am not sure how to perform the search you are describing but I can help you with the keyListener stuff. JComboBox is the worst Swing component you can think of ...

Enjoy,
Manfred
 
Brian Snyder2002
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Manfred!!!
This is just what I needed!
 
kalpana s
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have used the same piece of code, but the key events are not getting triggered.
What could be the problem.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic