Java - Resetting a value of a element in a list
<p>So I have this list of films sorted in a JList. How these elements are created is sorted in another class. Here's the code for the list.
            filmlist = new FilmList();</p>

<pre><code>    //Pre loaded film data
    filmlist.addFilm("The Matrix", "A", "18", "2", 100);
    filmlist.addFilm("Wreck It Ralph", "B", "U", "5", 150);
    filmlist.addFilm("Sin City", "C", "18", "3", 100);
    filmlist.addFilm("Starwars", "D", "PG", "3", 150);
    filmlist.addFilm("Back to the Future", "E", "PG", "2", 80);
    filmlist.addFilm("Willy Wonka &amp; the Chocolate Factory", "F", "U", "1", 75);
    filmlist.addFilm("Avatar", "G", "PG", "2", 80);
    filmlist.addFilm("Disturba", "H", "PG", "1", 80);
    filmlist.addFilm("Monsters Inc", "I", "U", "1", 100);
    filmlist.addFilm("The Godfather", "J", "18", "1", 100 );

    theFilmList.setModel(filmlist);
</code></pre>

<p>And I have a method that simulates the purchasing of a ticket for one of these films. Atm it basically prints out the values.</p>

<pre><code>    public void buyTicket() {
    String newFilmName = filmNameTF.getText();
    String newLecture = lectureTF.getText();
    String newAge = ageTF.getText();
    String newPrice = priceTF.getText();
    int newSeats = Integer.parseInt(seatsTF.getText()); // convert the int to a String
    int newSeatsNo; // the new number of seats for the film

    newSeatsNo = newSeats - 1;


    if (JOptionPane.showConfirmDialog(this, "Are you sure you want to buy a ticket for " + newFilmName + " at the cost of £" + newPrice,
            "Purchase Ticket", JOptionPane.YES_NO_OPTION) 
            == JOptionPane.YES_OPTION) {// Are you sure dialog      

        if (newFilmName.equals("") || newLecture.equals("") || 
                newAge.equals("") || newPrice.equals("")) {
            JOptionPane.showMessageDialog(this, "Please select a film from the list");
        } else {
            System.out.println("- Receipt -");
            System.out.println("Film: " + newFilmName);
            System.out.println("Lecture Hall: " + newLecture);
            System.out.println("Age Rating: " + newAge);
            System.out.println("Price of Ticket: " + "£" + newPrice);

        }
</code></pre>

<p>What I wanna do is change the value of the last element in the list which is the number of seats. I can do equations by doing "newSeatsNo = newSeats - 1;". How do I get the value of that equation replaced in the JList? </p>

<p>I hope you understand what I mean, just say if you need more code from any of the classes.</p>

<pre><code>public class FilmList extends DefaultListModel {
public FilmList(){
    super();
}

public void addFilm(String film, String  lecture, String age, String price, int seats){
    super.addElement(new FilmSystem(film, lecture, age, price, seats));
}

}
</code></pre>

<p>Film List class.</p>
