A man received the maximum sentence in a case where he showed up at a courthouse with an ax and threatened to kill a judge in Grants.