How to remove all elements from a JList?
843806Dec 4 2007 — edited Dec 7 2007Hi,
I'm trying to make a list, and i'd like it to remove all the elements from it from time to time, but i have no idea how to do it. I've read the page about JList, but it didnt contain information about removing all, or selecting all (then remove) or remove a non-selected element.
I'd either need to select all the elements, and then remove them, or if there is another way, i need to remove all the elements, even which are not selected. The problem is, that I couldn't find any parts telling about this at the JList's tutorial page.
Does anyone know a way to do this?