EditorEx () { EditorEx editor = createEditor(); editor.getContentComponent().setEnabled(isEnabled()); if (myCaretPosition >= 0) { editor.getCaretModel().moveToOffset(myCaretPosition); editor.getScrollingModel().scrollToCaret(ScrollType.MAKE_VISIBLE); } String tooltip = getToolTipText(); if (StringUtil.isNotEmpty(tooltip)) { editor.getContentComponent().setToolTipText(tooltip); } myEditor = editor; add(editor.getComponent(), BorderLayout.CENTER); return editor; }