I want to be able to display all items in an arrayList in a JTextArea. This is the code I have but it does not work.
public void display()
{
JPanel display = new JPanel();
display.setVisible(true);
JTextArea a;
for (Shape ashape : alist)
{
System.out.println("");
System.out.println(ashape.toString());
a = new JTextArea(ashape.toString());
display.add(a);
}
Container content = getContentPane();
content.add(display);
}