Hello, I am loading a file with some data that I have stored in a MySql database, then with a mouseclicked event I select a record to edit it and in that interface there is a button that shows me a jdialog to be able to edit some records of my database, the problem is that after I have edited a record or even if I close the jdialog without editing anything and I want to select another record, any record that I select returns me position -1.
The method to invoke the jdialog is as follows (although I do not think that is the problem):
private void btnActualizaUbicacionMouseClicked(java.awt.event.MouseEvent evt) {
String rol = config.validacion();
if (rol.equals("0")) {
JOptionPane.showMessageDialog(null, "No tiene el permiso para editar la ubicación", "Aviso", JOptionPane.INFORMATION_MESSAGE);
} else {
ActualzarUbicacionDialog dialogUbic = new ActualzarUbicacionDialog(this, true);
ActualzarUbicacionDialog.lblProd.setText(txtNombreProd.getText());
dialogUbic.setVisible(true);
if (dialogUbic != null) {
if (!dialogUbic.getInfo().equals(" ")) {
updateTabla();
txtUbicacion.setText(dialogUbic.getUbic());
} else {
updateTabla();
}
}
}
}