title: show input dialog box after error message dialog box
body: <p>I need to display an input dialog box and enter the player's name.</p>
  
  <p>If the player clicked the ok button and the value of the input dialog is either a number or null an error should be displayed. If the player clicks the ok button of the error message dialog box, the input box will appear again.</p>
  
  <p>I don't know if my code is wrong. I forgot how to code in java because of my web programming subject.</p>
  
  <pre><code>int[] player = new int[1];
  for(int a =0; a&lt;player.length; a++){
      String input = JOptionPane.showInputDialog("Enter your Name:",JOptionPane.OK_CANCEL_OPTION); 
  
      try {
          if(!input.matches("[a-zA-Z]+")){
              JOptionPane.showMessageDialog(null,"Use Letters only", "Warning", JOptionPane.OK_OPTION);    
          } else {
              input = String.valueOf(player[a]);
              category c = new category();
              this.dispose();
              c.show();
          }
      }
      catch(Exception e){   
  };
  </code></pre>