Draw string with Graphics2D
Posted on 2004-09-16
I'm having a major obstacle in my Swing application. According to the API, the drawString method in Graphics2D will make the lefthand side of the baseline the x and y (x and y are the arguments of the drawString method).
Is there any way I can make the x and y the top left hand corner of the string? It is something like shifting the anchor point, so that the top left hand corner of the string will be at x and y.