title: JOptionPane.showInputDialog is displayed twice, why?
body: <p>I'm recently developing an swing app in java and the issue is that every time i need to input data into JOptionPane.showInputDialog this is called twice and no matter what i do in a basic test always is showed double. In the first window i enter data and when clicked accept another window is also displayed simultaneously, ignoring the first one. It's important to mention my app is running right but when i need to execute the switch sentence in the choice No. 3 it's when the problem occurs. </p>
  
  <p>here my code.</p>
  
  <pre><code>private void jcTemplatesItemStateChanged(java.awt.event.ItemEvent evt) {                                             
  
      int seleccionar = jcTemplates.getSelectedIndex();
  
      switch (seleccionar) {
  
          case 1:
  
              templateField2.setText(jcTipoCliente.getSelectedItem() + " " + txtCliente.getText() + " comenta que no reconoce POD. Favor de realizar rescate del envio y entregarlo en la direccion correcta. Se le informa sobre proceso y tiempo requerido de 24-48 hrs. Queda Ok. Gracias.  ");
              break;
  
          case 2:
              templateField2.setText(jcTipoCliente.getSelectedItem() + " " + txtCliente.getText() + " llama para requerir informacion sobre el status del envio, ya que menciona que ha tomado demasiado tiempo y requiere confirmar fecha de entrega. Favor de actualizar a la brevedad. Se le pide tiempo y queda Ok. Gracias. ");
              break;
  
          case 3:
  
              String dato = JOptionPane.showInputDialog(null, "NCI", "Verificar", JOptionPane.OK_CANCEL_OPTION);
              if (JOptionPane.YES_OPTION == 0) 
                  templateField2.setText(dato);
               else if (JOptionPane.NO_OPTION == 1) 
                  dispose();
          break;
  
      }
  </code></pre>