There's the point at the end where the punishment is prescribed, but that's often so codified that the king can ask the unwitting culprit what an appropriate punishment for a crime, described in the abstract -- either individually or as part of a crowd -- and then inflict it after revealing that he knows it wasn't theoretical.
Rarely, the king gets to judge a civil suit -- wrong -- and his wife the peasant's clever daughter has to tell the victim how to point out his silliness.
but bandits. There's a point where justice could clearly be applied. . . .
But no. They pounce on the travelers, sometimes, leaving our hero glad he followed advice to avoid that road. They try to marry young maidens -- and then they get justice, usually from the family of the bribe and friends. They find a young girl in the woods and take her in as their little sister, until her mother or stepmother manages to put her into an enchanted sleep. But the kings do not go after them or send forces.
Such are the limits of the fairy tale plot.