Ejemplo n.º 1
0
  private void cargarEdicion() {
    try {

      this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
      Cliente cliente = ClienteNegocio.Obtener(id);
      if (cliente != null) {

        txtNombre.setText(cliente.getNombre());
        txtCalle.setText(cliente.getDireccion().getCalle());
        txtCelular.setText(cliente.getCelular());
        txtCiudad.setText(cliente.getDireccion().getCiudad());
        txtColonia.setText(cliente.getDireccion().getColonia());
        txtCorreo.setText(cliente.getCorreo());
        txtNumero.setText(cliente.getDireccion().getNumero());
        txtTelefono.setText(cliente.getTelefono());
      }
    } catch (Exception e) {
      JOptionPane.showMessageDialog(
          this,
          ResourceBundle.getBundle("gdm/entidades/clases/resource").getString("ErrorMensaje"),
          ResourceBundle.getBundle("gdm/entidades/clases/resource").getString("TituloError"),
          JOptionPane.INFORMATION_MESSAGE);

    } finally {
      this.setCursor(Cursor.getDefaultCursor());
    }
  }