All this advice is well and good, but a few scripted events and personality traits can go a long way toward establishing a personality. Here's some scenery taken from various fictions and my own games.
1) Every night in his grand hall, the king invites a different person to sit at his side and speaks with them about what they do for his kingdom. One night he might get a crash course in wagonmaking--the next, a ghost story from the oldest woman in his city.
2) He conducts his own executions. Not out of sadism, but because, if he's going to take a man's life, he should have the cahones to do it himself. In that way, he'll always understand how the people view his justice.
3) He is not a great fighter. Sure, he can defend himself reasonably well, but the man is past his prime, perhaps sporting an injured arm or an empty lung. Doing this both establishes sympathy and keeps him from overshadowing your PCs.
4) His soldiers are fiercely loyal, shouting "Long Live King _____!" before entering battle. He seems forever at odds with his retainers, denying them their warnings that he stay where it's safe when there's s+&% that needs inspecting.
5) His children are intelligent, well-behaved, and mature for their ages.
6) He disguises himself as a commoner and wanders among his people to learn what they say when he's not around. This is easy to do, because most people know him more by his crown than his face. Rumor has it that he was once imprisoned on one of these ventures, and that he spent an entire day in the prison before revealing his identity, at which point he gave his justice system a significant overhaul. Of course, the bards have a tendency to exaggerate.
7) He has plenty of advisers, but asks them all to leave the room so that he can speak candidly with the PCs. They are the only people he can confess his weaknesses too, and he demands that they speak truthfully to him about everything, regardless of how he feels.
8) If they're interested, he'll give the PCs titles in his court: "Master of Assassins" for the rogue, "Lord Marshal" to the ranger, "Knight Captain" to the paladin, "First Wizard" to the wizard, "Archbishop of the Stolen" to the cleric, and so on.
9) He passes stark, just laws in response to campaign events. If there's religious disputes, he asks for the PCs help in drafting a law to keep them from fighting.
10) He reads.