He was a Tony Award nominee for two roles, and gained prominence in the starring role in director Elia Kazan 's film A Face in the Crowd (1957) before he became better known for his television roles, playing the lead characters in the 1960–1968 situation comedy The Andy Griffith Show and in the 1986–1995 legal drama Matlock .