1 | This is a straightforward generalization... |
2 | First, calculate the height of n strings : int height = n*stringHeight + (n - 1)*leading; |
3 | The y-position of the first string is once again: int y = (appletHeight - height )/2 + ascent; while the position of each subsequent string is: y += stringHeight + leading; |