title: JTextField.getText() returns an empty String
body: <p>I am trying to create a window which allows the user to create a new student. The problem here is whenever the user presses the Save button:</p>
  
  <pre><code>private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {                                           
      controlador.btnSaveClic(evt);
  }
  </code></pre>
  
  <p>Then, the method btnSaveClic:</p>
  
  <pre><code>public void btnSaveClic(ActionEvent evt){
      this.save();
  }
  </code></pre>
  
  <p>And the method save()</p>
  
  <pre><code>private void save() {
      String name = this.window.getTxtfName().getText().trim();
      String lastName = this.window.getTxtfLastName().getText().trim();
      String CX = this.window.getTxtfCX().getText().trim();
      int dni;
      String dn1= this.window.getTxtfDNI().trim();
      System.out.println("name"+name+" last name"+lastName+" DNI"+dn1+" CX"+CX);
      try
          {
          dni = Integer.parseInt(dn1.trim());
          System.out.println(dni);
          String result = gestor.newStudent(name, lastName, dni, CX);
          if (result.equals(EXITO_ALUMNOS)){
              this.window.dispose();
          }    
          if (result.equals(FAIL_ALUMNOS)){
              JOptionPane.showMessageDialog(null, resultado, resultado, JOptionPane.ERROR_MESSAGE);
          }
          }
          catch (NumberFormatException nfe)
          {
              JOptionPane.showMessageDialog(null, "Missing data", "Error", JOptionPane.ERROR_MESSAGE);
          }
  }
  </code></pre>
  
  <p>I've also tried to make the getters obtain the text in the text fields, and return the strings, but everything is empty anyways. Eventually the output, at every case, would be:</p>
  
  <p><code>name last name DNI CX</code></p>
  
  <p>The problem is not on the newStudent method, because it never actually reaches that point, since the textFields are considered as empty, no matter what.</p>