• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Textfield with autoscroll feature!

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
reply
    Bookmark Topic Watch Topic
  • New Topic