what is the best way to display an arraylist? i am currently trying to display it in a textarea but not sure what method to use...
class Action2 implements ActionListener {
public void actionPerformed (ActionEvent e) {
String name = field2.getText();
String homeworks = field3.getText();
String exams = field4.getText();
record = new StudentRec(name, homeworks, exams);
db.addRecord(record);
int i = db.getSize();
label6.setText("size of db = " + i);
ArrayList<StudentRec> ls = db.printArrayList();
for(int j=0; j< ls.size(); j++){
textArea1.method(ls.get(j));} // <-----
}
}