How to display arraylist of obejects each in separate line? I have this code currently it display only in one line. I want to use the "\n" but how to add it in JOptionPane?
ArrayList<String> ordered = new ArrayList<String>();
case "Sales Report File":
JOptionPane.showMessageDialog(null,"Items list sold: " +
ordered(this outputs in one line)
,"Sales Report ~ ",JOptionPane.PLAIN_MESSAGE);