I think from your description above, as pointed out by SL, telling them about consequence would be a less effective way of stopping it than the 'friendly' approach, e.g., humor, wit, positive body language, smiles etc. It is likely that this approach would not have worked either.
The other question I would ask is did you start dealing with it from the get go or did you let it go for a little while before taking action (when was first time?). It is important in situations like this to get in early, especially if you sense it coming before the game starts. For me, one obvious dissent is a caution, but also frequent little subtle little ones is also a caution even if comes from different players (for the latter I always warn first).
Were the comments coming from players too? Either way another possibility is to get the captain involved. Something like "Mate I will do my best to keep these players and the bench in the game but i cant just ignore them. I am giving you chance to help keep them in. Do what you have to do to stop it or i will have no option but to deal with it directly. Ball is in your court now."
Last thing, "swear at me" is a bit general. This may well be a straight red card first time depending on the words, context and manner. Were they about your decisions, general game context or were they at you as a person?