I have an app I'm working on that reads an xml file, creates a map of objects, I then use the map to populate the list.
I have a search window that I want to use to narrow the list; when a user enters a character, I have a method that loops through the list, looks for that string, and only places matching objects in the new list.
So far it works in terms of what is viewable on the panel, but in the narrowed list I can't select anything....
What's the best way to accomplish this task?
I notice that I'm not removing the list that exists on the panel....maybe I need to do that. Any other ideas?
Please post an Short, Self Contained, Correct (Compilable), Example.
From this code I can't see anything. You create a new DefaultListModel and that's all. How do you change your list's model? The content of the listmodel shouldn't prevent you to select anything, so my guessing is that there's some problem in other part of your code.