getGlyphPainter().paint(this, g, a, p0, p1);
g.setColor(fg); glyphPainter.paint(this, g, a, p0, p1); boolean underline = isUnderline(); boolean striked = isStrikeThrough(); if (underline || striked) { View parent = getParent();  if (parent != null && parent.getEndOffset() == p1) {  Segment s = getText(p0, p1); while (s.count > 0 && Character.isWhitespace(s.array[s.count - 1])) { p1--; s.count--; } } int x0 = r.x; int p = getStartOffset(); TabExpander tabEx = getTabExpander(); if (p != p0) x0 += (int) glyphPainter.getSpan(this, p, p0, tabEx, x0); int x1 = x0 + (int) glyphPainter.getSpan(this, p0, p1, tabEx, x0);  int y = r.y + r.height - (int) glyphPainter.getDescent(this); if (underline) { int yTmp = y; yTmp += 1; g.drawLine(x0, yTmp, x1, yTmp); } if (striked) { int yTmp = y; yTmp -= (int) glyphPainter.getAscent(this); g.drawLine(x0, yTmp, x1, yTmp); } }
  public void paint(Graphics g, Shape a)  {    checkPainter();    int p0 = getStartOffset();    int p1 = getEndOffset();    Container c = getContainer();    // Paint layered highlights if there are any.    if (c instanceof JTextComponent)      {        JTextComponent tc = (JTextComponent) c;        Highlighter h = tc.getHighlighter();        if (h instanceof LayeredHighlighter)          {            LayeredHighlighter lh = (LayeredHighlighter) h;            lh.paintLayeredHighlights(g, p0, p1, a, tc, this);          }      }    getGlyphPainter().paint(this, g, a, p0, p1);  }