Hello,
I have populated myList.list which is simply ArrayList<MyFile>
When i run this code:
DefaultListModel listModel = new DefaultListModel();
for(int i = 0; i < myList.list.size(); i++)
{
listModel.addElement(myList.list.get(i));
}
lstFilesList.setModel(listModel);
at first time everything is ok, JList is populated, at second time also unless i check some row on this JList.
If I do so, i get ArrayIndexOutOfBoundsException..
(it's thrown by lstFilesList.setModel(listModel); line)
this Ive been looking for the answer, but didnt get any result;/
do you know why does it happen?