Caret caret = textComponent.getCaret(); if (caret == null) { caret = createCaret(); textComponent.setCaret(caret); }  Highlighter highlighter = textComponent.getHighlighter(); if (highlighter == null) textComponent.setHighlighter(createHighlighter());  String prefix = getPropertyPrefix(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); textComponent.setBackground(defaults.getColor(prefix + ".background")); textComponent.setForeground(defaults.getColor(prefix + ".foreground")); textComponent.setMargin(defaults.getInsets(prefix + ".margin")); textComponent.setBorder(defaults.getBorder(prefix + ".border")); textComponent.setFont(defaults.getFont(prefix + ".font"));  caret.setBlinkRate(defaults.getInt(prefix + ".caretBlinkRate"));
  protected void installDefaults()    {  }