Advertisement
gallopelado

Evento MouseClicked de una grilla en Java

Apr 4th, 2017
502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.73 KB | None | 0 0
  1. private void tablaMouseClicked(java.awt.event.MouseEvent evt) {                                  
  2.         if (accion.equals("")) {
  3.             String vid = tabla.getValueAt(tabla.getSelectedRow(), 0).toString();
  4.             String vnombre1 = tabla.getValueAt(tabla.getSelectedRow(), 1).toString();
  5.             String vnombre2 = tabla.getValueAt(tabla.getSelectedRow(), 2).toString();
  6.             String vnombre3 = tabla.getValueAt(tabla.getSelectedRow(), 3).toString();
  7.             String vapellido1 = tabla.getValueAt(tabla.getSelectedRow(), 4).toString();
  8.             String vapellido2 = tabla.getValueAt(tabla.getSelectedRow(), 5).toString();
  9.             String vsexo = tabla.getValueAt(tabla.getSelectedRow(), 6).toString();
  10.             String vestadocivil = tabla.getValueAt(tabla.getSelectedRow(), 7).toString();
  11.             String vtel1 = tabla.getValueAt(tabla.getSelectedRow(), 8).toString();
  12.             String vtel2 = tabla.getValueAt(tabla.getSelectedRow(), 9).toString();
  13.             String vcorreo = tabla.getValueAt(tabla.getSelectedRow(), 10).toString();
  14.             String vidcargo = tabla.getValueAt(tabla.getSelectedRow(), 11).toString();
  15.             String vidrol = tabla.getValueAt(tabla.getSelectedRow(), 12).toString();
  16.             String vidpais = tabla.getValueAt(tabla.getSelectedRow(), 13).toString();
  17.             String vidciudad = tabla.getValueAt(tabla.getSelectedRow(), 14).toString();
  18.             String vidsubcargo = tabla.getValueAt(tabla.getSelectedRow(), 15).toString();
  19.             String vci = tabla.getValueAt(tabla.getSelectedRow(), 16).toString();
  20.             String vdireccion = tabla.getValueAt(tabla.getSelectedRow(), 17).toString();
  21.             txtID.setText(vid);
  22.             txtNombre1.setText(vnombre1);
  23.             txtNombre2.setText(vnombre2);
  24.             txtNombre3.setText(vnombre3);
  25.             txtApellido1.setText(vapellido1);
  26.             txtApellido2.setText(vapellido2);
  27.             txtIDsexo.setText(vsexo);
  28.             txtIDEstadoCivil.setText(vestadocivil);
  29.             txtTelefono1.setText(vtel1);
  30.             txtTelefono2.setText(vtel2);
  31.             txtCorreo.setText(vcorreo);
  32.             txtIDcargo.setText(vidcargo);
  33.             txtIDrol.setText(vidrol);
  34.             txtIDpais.setText(vidpais);
  35.             txtIDciudad.setText(vidciudad);
  36.             txtIDsubcargo.setText(vidsubcargo);
  37.             txtCi.setText(vci);
  38.             txtDireccion.setText(vdireccion);
  39.             recuperar_cargo();
  40.             recuperar_rol();
  41.             recuperar_pais();
  42.             recuperar_ciudad();
  43.             recuperar_subcargo();
  44.             recuperar_sexo();
  45.             recuperar_estadocivil();
  46.             btnModificar.setEnabled(true);
  47.         }
  48.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement