private void jBRemoveMusicActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBRemoveMusicActionPerformed
        final JTable tabela = p.getPnTabelaMusica().getTblMusic();
        int rowIndex = tabela.getSelectedRow();
        //System.out.println("rowIndex: "+rowIndex);
        int cod = p.getPnTabelaMusica().getCliqueMusica();
        this.m = p.getApp().searchMusic(cod);
        //linhas seleccionada na tabela
            if (m.getCreatorEmail().equals(p.getLogged().getEmail())) {

                p.getApp().removeMusic(m);
                p.getPnTabelaMusica().removeLinha();

                //Actualiza a tabela de musicas
                p.getPnBaseTabela().removeAll();
                p.getPnBaseInfo().removeAll();

                p.getPnBaseTabela().add(new PnTabelaMusica(p, p.getApp().getMusicsList()));
                p.getPnBaseInfo().add(p.getPnListaMusicas());

                p.revalidate();
                p.repaint();
                JOptionPane.showMessageDialog(this, "Music Removed", "Success", JOptionPane.INFORMATION_MESSAGE);

            }else if(rowIndex == -1){
                JOptionPane.showMessageDialog(this, "Please select one music from the table",
                    "ERROR", JOptionPane.ERROR_MESSAGE);
            }         
            else {
                JOptionPane.showMessageDialog(this, "You don´t have permission to remove this music",
                        "ERROR", JOptionPane.ERROR_MESSAGE);
            }
        update();
    }//GEN-LAST:event_jBRemoveMusicActionPerformed