boolean () { Editor editor = getEditor(); if (editor != null) { final boolean b = editor.getContentComponent().requestFocusInWindow(); editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE); return b; } else { return super.requestFocusInWindow(); } }