private void btnAceptarVehiculoActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnAceptarVehiculoActionPerformed DefaultTableModel modeloTabla = (DefaultTableModel) tblVehiculo.getModel(); GestorHibernate gestorH = new GestorHibernate(); int fila = tblVehiculo.getSelectedRow(); Iterator ite = gestorH.listarClase(Vehiculo.class).iterator(); while (ite.hasNext()) { Vehiculo vehiculo = (Vehiculo) ite.next(); if (vehiculo.getDominio().equals(modeloTabla.getValueAt(fila, 0))) { txtVehiculo.setText(vehiculo.getModelo().toString()); txtDominio.setText(vehiculo.getDominio()); txtTransportista.setText(vehiculo.getTransportista().toString()); txtTara.setText(String.valueOf(vehiculo.getTara())); txtTipoVehiculo.setText(vehiculo.getTipoVehiculo().toString()); } } } // GEN-LAST:event_btnAceptarVehiculoActionPerformed