Being a jerk is not a crime. Contempt of court is.
Accidents are not contemptuous. The judges actions were clearly contemptuous however and he will pay a price for that.