entry.painter.paint(g, entry.p0, entry.p1, bounds, textComponent);
if (! (entry instanceof LayerHighlightEntry)) entry.painter.paint(g, entry.getStartOffset(), entry.getEndOffset(), bounds, textComponent);
  public void paint(Graphics g)  {    int size = highlights.size();        // Check if there are any highlights.    if (size == 0)      return;        // Prepares the rectangle of the inner drawing area.    Insets insets = textComponent.getInsets();    Shape bounds =      new Rectangle(insets.left,                    insets.top,                    textComponent.getWidth() - insets.left - insets.right,                    textComponent.getHeight() - insets.top - insets.bottom);        for (int index = 0; index < size; ++index)      {	HighlightEntry entry = (HighlightEntry) highlights.get(index);	entry.painter.paint(g, entry.p0, entry.p1, bounds, textComponent);      }  }