Adding \ removing items from Jlist
Hello! Could anybody help me with a function of adding(populating) \ removing items from Jlist?
I am selecting some files with Swing File chooser, and setting them to Jlist.
As known, setListData
sf = chooser.getSelectedFiles();
But I need multiple adding of these files, and for now have no idea how to add more items to list.
Constructs a read-only ListModel from an array of objects, and calls setModel with this model.
Also It would be good to know how the good method to remove items from there...
Thanks for further help...