Never heard of it.
Using the J2SE packages, I've used Graphics to get the size of an image, then the
FontMetrics class to determine the size of the
string. Subtract the string size from the size of the image and divide by two. Of course, doing multiple lines requires some more calculations, but the information is all there in those two classes.