title: Parsing a password to an integer
body: <p>This is code for reading a text field in Java Swing </p>
  
  <pre><code>jbtLogin.addActionListener(new ActionListener() {
      String id=jtfId.getText();      
  
      String s=new String(jpass.getPassword());
      int password = Integer.parseInt(s); 
  </code></pre>
  
  <p>But I have this error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NumberFormatException: For input     string: ""
      at java.lang.NumberFormatException.forInputString(Unknown Source)
      at java.lang.Integer.parseInt(Unknown Source)
      at java.lang.Integer.parseInt(Unknown Source)
  </code></pre>