A hatter is a maker or seller of hats. The proverbial expression "mad as a hatter" may refer to the mercury-poisoning suffered by many hatters in the eighteenth and nineteenth centuries, when mercury was used in the manufacture of felt.
... cranky professor forced to stay immobile because of a broken leg in 1942's The Man Who Came to Dinner[?], which he had performed onstage before taking it to Hollywood.
...