I am in a beggining Java class, here is the code:
JOptionPane.showMessageDialog(null, "Here is a list of Friends:"
+ Friends.arrayNames. + "\n");
What I am trying to do is create one dialog box, containing an entire list of String names from the array. I tried a for loop,
for(int i=0;i < Friends.arrayNames.length; i++)
{
JOptionPane.showMessageDialog(null, "Here is a list of Friends:"
+ Friends.arrayNames. + "\n");
}
But this posts a new dialog box for each name in the array. Anyone have any ideas?
JOptionPane.showMessageDialog(null, "Here is a list of Friends:"
+ Friends.arrayNames. + "\n");
What I am trying to do is create one dialog box, containing an entire list of String names from the array. I tried a for loop,
for(int i=0;i < Friends.arrayNames.length; i++)
{
JOptionPane.showMessageDialog(null, "Here is a list of Friends:"
+ Friends.arrayNames. + "\n");
}
But this posts a new dialog box for each name in the array. Anyone have any ideas?