FontRenderContext frc = g.getFontRenderContext();
LineBreakMeasurer lbm = new LineBreakMeasurer(attrstr.getIterator(), frc);
layouts.clear();
int pos = lbm.getPosition();
int linebreak = text.indexOf("\n", pos);
TextLayout tl = lbm.nextLayout((float)dispArea.getWidth(), (linebreak == -1 ? text.length() : linebreak + 1), false);
do {
layouts.add(tl);
pos = lbm.getPosition();
linebreak = text.indexOf("\n", pos);
tl = lbm.nextLayout((float)dispArea.getWidth(), (linebreak == -1 ? text.length() : linebreak + 1), false);