for (int i = 0, n = rows.getLength(); i < n; i++) {
Row row = rows.get(i);
Rectangle2D textBounds = row.glyphVector.getLogicalBounds();
float rowWidth = (float)textBounds.getWidth();
if (clipBounds.intersects(new Rectangle2D.Float(0, rowY, rowWidth, rowHeight))) {
if (selected) {
graphics.setPaint(focused && editable ?
textAreaSkin.getSelectionColor() : textAreaSkin.getInactiveSelectionColor());
} else {
graphics.setPaint(textAreaSkin.getColor());