/** * Fetches the text component that currently has focus. This allows actions to be shared across * text components which is useful for key-bindings where a large set of actions are defined, but * generally used the same way across many different components. * * @return the component */ protected final JTextComponent getFocusedComponent() { return JTextComponent.getFocusedComponent(); }