I have a combobox, with certain elements within it, eg: "abc", "pqr", now when the user types "a", I wish to refresh the combobox and remove all its elements and then again add only those elements which start with the user string. (These elements are stored in a array)
I tried in to modify its elements in "addCaretListener" but it throws "java.lang.IllegalStateException: Attempt to mutate in notification" Exception
Is there a specific way to implement this?
Thanks