Dynamic Lists
It is fairly common to want to change the contents of lists on the fly, for example in response to input and commands from the user.
To do this we must deal directly with the model associated with a list.
Models for JList components only have to implement the fairly minimal ListModel interface.
Unless you need to do something very clever, you should probably stick to the DefaultListModel implementation of this interface, provided with Swing.