private void jBRemovePlayActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBRemovePlayActionPerformed
         /*
        //Actualiza toda a coluna 
        pagPrincipal.getPnBaseColuna().removeAll();
        pagPrincipal.setPnColuna(new PnColuna(pagPrincipal));
        pagPrincipal.getPnColuna().buildPlaylistListProp(pagPrincipal.getLogged().getPlaylists());
        pagPrincipal.getPnBaseColuna().add(pagPrincipal.getPnColuna());
        */
         int indiceLista = pagPrincipal.getPnColuna().getMyPlaylistsList().getSelectedIndex();
         int indiceTabela = pagPrincipal.getPnTabelaPlayList().getTblPlaylist().getSelectedRow();
         
         
         if(indiceLista==-1 && indiceTabela==-1){
        
            JOptionPane.showMessageDialog(this, "Please select one playlist from table or from the \"My Playlists\" list on the left.",
                    "ERROR", JOptionPane.ERROR_MESSAGE);
        } else if (indiceLista != -1 && indiceTabela != -1) {
            JOptionPane.showMessageDialog(this, "Please select just from table, or from playlist",
                    "ERROR", JOptionPane.ERROR_MESSAGE);
            pagPrincipal.getPnTabelaPlayList().getTblPlaylist().clearSelection();
            pagPrincipal.getPnColuna().getMyPlaylistsList().clearSelection();

        } else {

            if (indiceTabela == -1) {
                pagPrincipal.getLogged().removePlaylist(pagPrincipal.getPnColuna().getPlaylistProp().
                        get(pagPrincipal.getPnColuna().getMyPlaylistsList().getSelectedIndex()));
                pagPrincipal.getPnColuna().buildAllLists();
                pagPrincipal.actualizaTabelaMyPlaylist();
            }else{
                
                String nomePlay = (String) pagPrincipal.getPnTabelaPlayList().getTblPlaylist().getValueAt(indiceTabela, 0);
                Playlist playl = pagPrincipal.getLogged().findPlaylist(nomePlay);
            
                pagPrincipal.getLogged().removePlaylist(playl);
                
                //Actualiza toda a coluna 
                pagPrincipal.getPnBaseColuna().removeAll();
                pagPrincipal.setPnColuna(new PnColuna(pagPrincipal));
                pagPrincipal.getPnColuna().buildPlaylistListProp(pagPrincipal.getLogged().getPlaylists());
                pagPrincipal.getPnBaseColuna().add(pagPrincipal.getPnColuna());

                pagPrincipal.actualizaTabelaMyPlaylist();

            }
        }
    }//GEN-LAST:event_jBRemovePlayActionPerformed