Exemplo n.º 1
0
  private void jbDireccionesActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jbDireccionesActionPerformed
    if (tableClientes.getSelectedRow() != -1) {
      Integer fila = tableClientes.getSelectedRow();
      Long id = (Long) tableClientes.getModel().getValueAt(fila, 0);

      Cliente c = (Cliente) ClientesApp.getClienteC().findCliente(id);
      Direcciones d = new Direcciones(c);
      Aplicacion.getApp()
          .addFrame(d, "Direcciones de " + (String) c.getApellido() + " " + (String) c.getNombre());
    } else
      JOptionPane.showMessageDialog(
          null, "No ha seleccionado ningun cliente", "Error", JOptionPane.ERROR_MESSAGE);
  } // GEN-LAST:event_jbDireccionesActionPerformed