How can I hide characteres that are typed in showInputDialog

edited April 2016 in Questions about Code

Hello!!! I have been trying to hide the characters that are typed in a showInputDialog but I have not been able to do it!! when any character is introduce I want to show * I need help please!!

Answers

  • word = showInputDialog("Introduzca contraseña");

      if (word == null){
     showMessageDialog(null, "Ha cancelado la operación"
      , "Alerta", ERROR_MESSAGE);
      acceso=false;
      acceso2=true;
      }
    
      else if ("".equals(word)){
      showMessageDialog(null, "Contraseña vacía"
      , "Alerta", ERROR_MESSAGE);
      }
    
      if(word != null && !"".equals(word))
       acceso2=true;
       } while(acceso2==false);
    

    here is part of my code!

  • I have read your previous answers ! but i dont understand how you do to hide the characteres.. can you explain it to me with more detail??

Sign In or Register to comment.