So I have a GUI class and a class which will hold everything else. I have an ArrayList in the other class and I would like to populate the content of a Jlist in the GUI to the arraylist
I have this so far:
filmList = new JList(films.toArray());
getContentPane().add(filmList);
filmList.setBounds(27, 21, 638, 165);
It doesn't like just films.toArray() because it's in another class. What am I missing?
This is my FilmSystem class at the moment.
import java.util.ArrayList;
public class FilmSystem {
public FilmSystem() {
ArrayList<String> films = new ArrayList<String>();
films.add("A");