finally { Document doc = textComponent.getDocument(); if (doc instanceof AbstractDocument) { AbstractDocument aDoc = (AbstractDocument) doc; aDoc.readUnlock(); } } }
  public final void paint(Graphics g, JComponent c)  {    paintSafely(g);  }