Container host = getContainer(); if (host != null) { preferenceChanged(null, true, true); host.repaint(); } } finally { if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readUnlock(); }
  public void setParent(final View p)  {    super.setParent(p);    if (SwingUtilities.isEventDispatchThread())      setParentImpl();    else      SwingUtilities.invokeLater      (new Runnable()       {         public void run()    {           setParentImpl();         }       });    }