title: Is it possible to put multiple input in JOptionPane.showInputDialog?
body: <p>I was wondering if it is possible to put multiple inputs in JOptionPane.showInputDialog and then get the user input and if the user has given a wrong input for one of the questions then provide them with a error, asking them to re-enter that specific data again.</p>
  
  <p>For example, in the input I want questions like;</p>
  
  <ol>
  <li>How many times have to been out? between 1-10.</li>
  <li>Do you like number 1 or 2 or 3?</li>
  <li>Please state for how many hours your have between 1-10 you have stop in a restaurant? </li>
  <li>and I will need to add some more at a later stage.</li>
  </ol>
  
  <p>So instead of have a JOptionPane.showInputDialog for each question like this:</p>
  
  <pre><code> int timeout;
  
  do {
      String timeoutinputbyuser = JOptionPane.showInputDialog("How many times have to been out? between 1-10.");
      timeout = Integer.parseInt(timeoutinputbyuser);
  
  } while (timeout &lt; 1 || timeout &gt; 10);
  </code></pre>
  
  <p>I want to have all the questions in one and provide a suitable error if the user gets any question wrong.</p>