propertyChangeListener = new PropertyChangeHandler(); textComponent.addPropertyChangeListener(propertyChangeListener); documentListener = new DocumentHandler(); textComponent.getDocument().addDocumentListener(documentListener);
  public void install(JTextComponent c)  {    textComponent = c;    textComponent.addFocusListener(this);    textComponent.addMouseListener(this);    textComponent.addMouseMotionListener(this);    repaint();  }