I'm currently having an issue where when I output my array into an ordered list, it only outputs the very last song in the collection of five. Any help on how I can make it display all five would be appreciated. (First time trying to use arrays).
private void initActionPerformed(java.awt.event.ActionEvent evt) {
ArrayList songTitle = new ArrayList();
Collections.addAll(songTitle, "Pink Floyd - The Dark Side of the Moon", "AC/DC - Back in Black", "Led Zeppelin - Led Zeppelin IV", "Billy Joel - Piano Man", "Eric Clapton - Unplugged");
Collections.sort(songTitle);
for (int j = 0; j < songTitle.size(); j++) {
nameOutput.setText(j + "- " + songTitle.get(j));
}
}