How can we set a JComboBox to scroll to the entry that matches typed text most closely?

Sandip Chitale

It is already partially implemented. See -

This works for first character only (similar to Windows Explorer). To match the typed text (since when ? last focus gained ?)will require modality.

They are working on supporting it for other list like components for JDK1.4 also -


See section -

Add support for first letter component navigation in list like components
ID: 4284709 Target of Opportunity
JMenu*, JComboBox, JPopupMenu, JHtmlPane (the links), JTree,
JList, and JDesktopPane are components that present the user
with a "list" of objects to choose from. These objects could be
the names of features in a menu or folder icons in a file
directory. The problem it solves is it allows the user to
efficiently traverse long lists of data to get to a particular
entry or object (e.g. printer Teabag from a list of all
printers in CUP02).
What this feature does is move the keyboard focus to
the first object whose first letter matches the alphanumeric key
pressed by the user. Subsequent same key presses move the
keyboard focus to the next object that starts with the same
Other keyboard based features require the user to navigate
thru each of the possible choices presented to the user to get
to the one they want. This can be very tedious if the list of
choices is very long.