title: How to display more than one output using single JOptionPane.showMessageDialog() statement?
body: <p>How can I display more than one line using <code>JOptionPane.showMessageDialog()</code>. For example, I'm posting an example below. Now, in the example stated below the values <code>a1,b1,c1</code> have to be displayed one by one using the <code>JOptionPane.showMessageDialog()</code> Is there any way to show all the values in one window? because in the example stated below three windows will come one after one.</p>
  
  <pre><code>class demo()
  {
      public static void main(String args[])   
      {
            String a=JOptionPane.showInputDialog(null,"Enter a number");
            int a1=Integer.parseInt(a);
            String b=JOptionPane.showInputDialog(null,"Enter a number");
            int b1=Integer.parseInt(b);
  
            int c=a1+b1;
            JOptionPane.showMessageDialog(null,a1);
            JOptionPane.showMessageDialog(null,b1); 
            JOptionPane.showmessageDialog(null,c1);
      } 
  }
  </code></pre>