I wish to use Java2D drawString to achieve the following looks.
However, I have 0 idea how I an achieve the following text alignment?
As we can see, “Date:”, “Open:”, … are all being aligned to left.
And “30-Nov-09″, ‘1262.000”, … are all being aligned to right.
alt text http://sites.google.com/site/yanchengcheok/Home/drawstring.png
To right-align text you can figure out the width of the text you’re rendering, and then subtract that width from the x-coordinate. eg: