public void actionPerformed(ActionEvent e) {
        // only open the dialog if the playlist is not locked.
        if(!LockedPlaylistValueAccess.lockedPlaylist) {
            if (e.getSource() == openButton) {
                int returnVal = fc.showOpenDialog(FileChooser.this);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    File file = fc.getSelectedFile();
                    filePath = file.getAbsolutePath();
                } else {
                    System.out.println("Open command cancelled by user.");
                }
            }
        }
    }