Deleting stuff from a list is as easy as adding:
Contact contact = new Contact();
myListOfContacts.add(contact); // adds a contact
myListOfContacts.remove(contact); // removes the contact
No more magic needed.
Edit
Please, and this is not Java, strictly separate three things, and your life will become much, much easier:
- The model - your contacts stored in your arraylist(s)
- The view - Your JFrame, showing the data from the model (the list(s))
- The Controller - The code behind your buttons that does something with the model (adding, removing, changing data on the array list)
Maybe you've heard of the MVC pattern (model-view-controller).
So you don't 'export your' JList: on your View (the JFrame), you press a button and some code from your Controller (actually what you might have in your buttons action listener) is executed to write the model (your arraylist(s)) to the file.
Same goes for deleting, adding, importing. You 'do' something on the view (the GUI) to affect changes to the model (the list(s)).
As I said, this is not Java, this is a very, very common pattern for object oriented languages. Look at your code, try to find the model, the view, the controller and try to separate the code. Promise, once you've done it, the next assignements will be a joke.