Use bad language in the witness box? (5)

I believe the answer is:
swear
This clue might be a double definition.
'use bad language' is the first definition.
(I've seen this before)
'witness box?' is the second definition.
'swear' can be an answer for 'witness' (thesaurus). I am not sure about the 'box?' bit.
'in the' acts as a link.
Can you help me to learn more?
(Other definitions for swear that I've seen before include "Express annoyance" , "Use indecent or blasphemous language" , "Asseverate" , "not to mince one's words" , "Solemnly promise" .)
