for (int index = 0; index < highlights.size(); ++index)
for (int index = 0; index < size; ++index)
  public void paint(Graphics g)  {    // Check if there are any highlights.    if (highlights.size() == 0)      return;        Shape bounds = textComponent.getBounds();        for (int index = 0; index < highlights.size(); ++index)      {	HighlightEntry entry = (HighlightEntry) highlights.get(index);	entry.painter.paint(g, entry.p0, entry.p1, bounds, textComponent);      }  }