Reputation: 734
In my program I have created an excel sheet with many names. In a gui there is a text field. What i want is when user starts entering character(s), all the names beginning with those character(s) from the excel sheet should be pulled out and displayed. If the user enters more characters the list should change accordingly. Also user should be able to select one of those names with the mouse for further processing. eg : Excel Sheet Andy Angle Alice Australia John Jane
user starts entering 'a' output : Andy Angle Alice Australia
next letter 'an' output: Andy Angel and so on Thanks in advance and sorry if this is a basic question
Upvotes: 0
Views: 1058
Reputation: 208964
DocumentListener
to check for every time the document is change (i.e. a letter is typed or deleted from the text fieldJList
.DocumentListener
. I'm sure you can also search for other auto-complete Java implementations also.Upvotes: 1