I was just remembering this thread and feeling pissed off. As a lawyer, even trying to always win the judge's favor for my client, I would never let a client of mine submit to an inspection of his teeth at the judge's whim, they'd absolutely have to hold me in contempt first. (Unless, I guess, he had great-looking teeth and we could gain something from it.)
But the reality is that if you had a lawyer, he never would have done that. Just an attorney in a suit up there with you, even an overburdened or incompetent appointed one, is a barrier between you and the judge's whims, and he wouldn't feel quite as free to boss you around and insult you in such a totally unprofessional, undignified manner. I've seen some great defense lawyers with very shitty teeth, and mine aren't so great either, incidentally. But somehow it never came up in court...
So getting a license to act this way is something judges gain from not appointing attorneys where they don't have to. They get to treat the courtroom as their personal fiefdom where they make all the rules -- well, every judge feels this way really, but with no lawyers next to the people appearing before them, they get to let loose entirely, whether it's joking around or name-calling or impromptu dental inspections.
I'd say you ought to file a complaint (probably with the administrative judge) about this proceeding, but in reality it's likely to have little effect, and of course you'd want to wait until this is settled or you're long gone before putting your own name on anything.