I need to search a Maps keys based on user input.

So in a text field the user may type "M",then hit a button marked "search" this will bring up all keys that begin with M.
Mike
Molly
Michael
Michelle
Marvin

If they type "Mi" it will bring up
Michael
Michelle
Mike

If they type "Mic" it will output
Michael
Michelle

Any tips?
Cheers.
Glen...

Assuming the keys are Strings you can just loop through the keySet() testing each string with its startsWith method to select those keys that start with the desired string.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.