なんの参考にしたいのだろう?
フォント決めうちだと、こんな感じかな…?
x, y の位置に w の幅で折り返して表示。

Font f = Font.getFont(Font.SIZE_MEDIUM);
char[] ca = new char[1024]; // 1024文字まで
synchronized public void drawFoldedString(String s, Graphics g, int x, int y, int w) {
  int length = s.length();
  int current, next, dy = f.getHeight() + 2; //行間2dot

  if (length > ca.length) length = ca.length;
  s.getChars(0, length, ca, 0); g.setFont(f);

  for (current = 0; length > current; current += next, y += dy) {
    next = f.getLineBreak(s, current, length - current, w);
    g.drawChars(ca, x, y, current, next);
  }
}