I was googling for a solution to retrieve data back from a JList component, but didn't find any.So, is there a method of Jlist that return its items? I don't want just a selected one. I want the whole list.
The reason is I have this method that updates all the components of a dialogbox base on the selected value of a list box. I want to update that list box from the same method. So to do that, the method should not update the list box whenever it gets called. It should compare the values in the list box with the most recent data that I store in one class.(goes into infinite loop otherwise) Only when data in the list box doesn't match with the data in the class, it gets updated.
Is there such method to retrieve all the data of list box?