Ejemplo n.º 1
0
  private void itmCriarReceitaMouseClicked(
      java.awt.event.MouseEvent evt) { // GEN-FIRST:event_itmCriarReceitaMouseClicked
    if (tblPesquisa.getSelectedRow() == -1) {
      JOptionPane.showMessageDialog(this, "Selecionar um tripulante");
    } else {

      controller.criarReceita((Long) modelo.getValueAt(tblPesquisa.getSelectedRow(), 5));
    }
  } // GEN-LAST:event_itmCriarReceitaMouseClicked
Ejemplo n.º 2
0
 private void tblPesquisaMouseClicked(
     java.awt.event.MouseEvent evt) { // GEN-FIRST:event_tblPesquisaMouseClicked
   if (evt.getClickCount() > 1) {
     JTable target = (JTable) evt.getSource();
     if (itmNovo.isVisible())
       controller.abrirJanelaCadastro((Long) modelo.getValueAt(target.getSelectedRow(), 5));
     else controller.criarReceita((Long) modelo.getValueAt(tblPesquisa.getSelectedRow(), 5));
   }
 } // GEN-LAST:event_tblPesquisaMouseClicked