This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Textfield with autoscroll feature!

 
Ash Kondhalkar
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In our project we need a feature of textfield with autoscroll. It is similar to the auto scroll feature provided by google's home page textfield.
If I type "a" in the textfield on the google's home page, it shows all the words typed in the past starting with "a".
On the similar lines I need to provide a textfield. When user types any letter, then the data starting with the letter, should appear as drop down below textfield. Once user selects one item from the list, it should appear in the textfield.
I tried implementing it using jcombobox(by making it editable) and implementing the keyListener interface. But somehow the keyPressed, keyTyped and the keyReleased methods are not triggered.

Kindly help me.

Regards
Ashwin
 
Mark Newton
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have an example of the code you've used so far? It will make it much easier for people to point you in the right direction...
 
Ash Kondhalkar
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your response!
Actually I couldn't proceed much. I got stuck at point where the key related events couldn't be captured by Jcombobox, with editable option set to true.

Thanks & Regards
Ashwin
 
Mark Newton
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK... Have you added the key listener to the combo box?

You should have a line something like:

where foo is an instance of the class that implements KeyListener. As I say, it would be much easier to help if we could see what you've done so far...
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic