hi,
I have an arrayList in my program that I want to display in a Jlist. I need the JList to update his contents when the elements in the arraylist change/ an element is added/deleted/...
I'm lost on how to do this. Passing the arrayList as an array into the Jlistconstructo r will just display the elements, but no updates will be made according to the API.
Apparently ListDataListene rs should be used, and I don't seem to be able to find a nice simple tutorial on how to create these things.
Any help is appreciated. Thanks!
I have an arrayList in my program that I want to display in a Jlist. I need the JList to update his contents when the elements in the arraylist change/ an element is added/deleted/...
I'm lost on how to do this. Passing the arrayList as an array into the Jlistconstructo r will just display the elements, but no updates will be made according to the API.
Apparently ListDataListene rs should be used, and I don't seem to be able to find a nice simple tutorial on how to create these things.
Any help is appreciated. Thanks!
Comment