The code below finds the correct information from the array "info", only thing is it displays it in a series of message dialogs as the for loop executes. I want to display the details in one dialog. Can anyone advise how to collate the details during the for loop and display as one string output after the loop ends. Some code would be helpful.
//user selects cycle option
case 1: for (int row = 0; row < info.length; row ++)
JOptionPane.showMessageDialog(null,"Customers who use the cycle are" + '
+ (info[row] + " " + info[row]));