So I'd need to create two strings, one that holds the toString for a specific object and assign the other string variable to the first string? Wouldn't the string get replaced after every loop or would it hold all of them?
Then use the joptionpane outside of the loop, right?
public void DisplayList()
for(int i = 0; i < accounts.size(); i++)
Customer c = accounts.get( i ) ;
String s = c.toStringCustomer() ;
String r += s ;
JTextArea text = new JTextArea(r, 40, 40);
JScrollPane pane = new JScrollPane(text);
JOptionPane.showMessageDialog(null, pane, "Account Information",