The Jataka, Vol. III, tr. by H.T. Francis and R.A. Neil, , at sacred-texts.com
"While others weep," etc.—This story the Master, dwelling at Jetavana, told concerning a minister of the king of Kosala. The introductory story is identical with one already given. But in this case the king after bestowing great honour on a minister who served him well, gave ear to certain mischief-makers and had him seized and thrown into prison. While he was lying there, he entered upon the First Path. The king, becoming aware of his great merit, released him. He took a scented garland and coming into the presence of the Master, saluted him and sat down. Then the Master asked if some evil had not befallen him. "Yes, Reverend Sir," he answered, "but through evil good has come to me. I have entered on the First Path." "Verily," said the Master, "not you only, but sages of old got good out of evil." And herewith at his request he told a story of the past.
Once upon a time when Brahmadatta was reigning in Benares, the Bodhisatta was born to him as the son of his queen-consort. And they called him prince Ghata. He afterwards acquired a knowledge of the arts at Takkasilā and ruled his kingdom righteously.
Now a certain minister misconducted himself in the royal harem. The king, after witnessing the offence with his own eyes, banished him from
his kingdom. At that time a king named Vaṅka ruled in Sāvatthi. The minister went to him and entering his service, just as in the former story 1, gained the king's ear and got him to seize on the kingdom of Benares. After gaining possession of the kingdom, he had the Bodhisatta bound in chains and threw him into prison. The Bodhisatta entered on an ecstatic meditation  and sat cross-legged in the air. A burning heat sprang up in the body of Vaṅka. He came and beheld the countenance of the Bodhisatta radiant with the beauty of a full-blown lotus, like to a golden mirror, and in the form of a question repeated the first stanza:—
Why still with smiling face, has Ghata ne’er complained?
Then the Bodhisatta, to explain why he did not grieve, recited the remaining stanzas:—
One that is sick with sorrow pines away, Whether my home be on dry land or sea, But he that lacks completion in himself
It has no blessing for a future state:
Why should I, Vaṅka, of my woes complain?
Grief is no helpmeet fit with us to mate.
His food insipid and distasteful grows,
Pierced as with arrows, to his grief a prey,
He sinks a laughing-stock to all his foes.
Be it in village, or some forest drear,
No sorrow ever shall come nigh to me,
A soul converted can have nought to fear.
And is with lust of things of sense a-fire,
Not the whole world, with all its sordid pelf,
Can e’er suffice for such a man's desire.
One that is sick with sorrow pines away,
Whether my home be on dry land or sea,
But he that lacks completion in himself
 Vaṅka therefore, after hearing these four stanzas, asked forgiveness of the Bodhisatta, and restored him to his kingdom and went his way. But the Bodhisatta handed over the kingdom to his ministers, and retreating to the Himālayas became an ascetic, and without any break in his ecstatic meditation was destined to birth in the world of Brahma.
The Master, having ended his lesson, identified the Birth: "At that time Ananda was king Vaṅka, and I myself was king Ghata."
112:1 Compare No. 303 supra.