title: JOptionPane Multidimensional Array output
body: <p>Ok say I have Multidimensional array that I want to display in <code>JOptionPane.showMessageDialog</code>. I know that when using <code>System.out.println</code>, you use a for loop. However the array size is determined by the user input, therefore I have to use a incrementor.</p>
  
  <p>For example: <code>userinput[k]</code> next to <code>usernumber[k]</code> then the next row would be <code>userinput[k+1]</code> next to <code>usernumber[k+1]</code></p>
  
  <p>The trouble I am having is that by using my loop, it does each set one at a time in separate windows and not all together in a table in one window.</p>
  
  <pre><code>for (int k = 0; k &lt; userinput.length; k++){
      JOptionPane.showMessageDialog(null, userinput[k]);
  }
  
  for (int k = 0; k &lt; 2; k++){
      JOptionPane.showMessageDialog(null, usernumber[k]);
  }
  </code></pre>