wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Textfield with autoscroll feature! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Textfield with autoscroll feature!" Watch "Textfield with autoscroll feature!" New topic
Author

Textfield with autoscroll feature!

Ash Kondhalkar
Ranch Hand

Joined: Jun 14, 2006
Posts: 43
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

Joined: Jan 31, 2006
Posts: 129
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

Joined: Jun 14, 2006
Posts: 43
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

Joined: Jan 31, 2006
Posts: 129
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...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Textfield with autoscroll feature!
 
Similar Threads
Autoscroll JList
Textfield/Combobox with auto complete feature!
Autoscroll of JTextArea
Autoscroll mechanism in JTable
Making JScrollPane autoscroll slowly