private void updateOnTextChange() {
    final JComponent parent = (JComponent)getParent();
    if (parent != null) {
      parent.revalidate();
      parent.repaint();
    }
    adjustSize();
  }
private void updateOnTextChange()