California judge orders man stunned in courtroom