Title: JComboBox selection based on key presses

Hello Swing Experts,
         I have a need to expand and select a JComboBox based on the key press(es) (up to 3 chars).  This feature is similar to Windows File Explorer.  In the Windows File Explorer, on the left hand side (where you have the directory tree structure), if you press any key, the tree selection will be moved to a dir starting with that letter (of key pressed) and immediately if you press another key, the selection will be for the second letter.  For example, consider the directory structure below:

                 T
                 Te
                 Tes
                 Test
Assuming I have the above list of entries in my JComboBox, the first time, when you press "T", the string with the name "T" is selected and immediately if you press "e", (say with in a second), the selection is changed to "Te" and if  you press "s" immediately, the selection is changed to "Tes".  How can I do this in Java?


Thanks

Sai

Reply via email to