Component () { if (myLastFocusedEditorComponentIdx >= 0) { JComponent[] focusableComponents = myEditor.getFocusableComponents(); if (myLastFocusedEditorComponentIdx < focusableComponents.length) { return focusableComponents[myLastFocusedEditorComponentIdx]; } } return myEditor.getPreferredFocusedComponent(); }