-1
I have an Event class with an attribute arraylist<string>lista
. I fill this attribute in a Telalista Jframe and use a evento.setLista("informaçao");
to add the textField string to the arraylist of the Event class. I would like to know how I can use this information that was saved by the set in another class. I tried to do the following:
ArrayList<String> st = new ArrayList();
Evento ev = new Evento();
st = ev.getLista();
for (int i = 0; i < st.size(); i++) {
System.out.println("teste" + st.get(i) );
}
}
but this st array is empty...
The Jframe I commented that is filling with the setLista is like this:
Evento listaTipo = new Evento();
listaTipo.setLista(textFieldNome.getText());
anyone has any idea how I can get the arraylist st of the other class in question to be filled with the information I saved in jframe?