tags:

views:

56

answers:

1

I have a component inside a JInternalFrame which needs to perform actions when keys are pressed within the JInternalFrame's parenting window. Using InputMap/ActionMap would be ideal, but the getInputMap(WHEN_IN_FOCUSED_WINDOW) of the component returns an InputMap that treats the JInternalFrame as the "focused window", rather than its parenting window. Any solutions or ideas?

+1  A: 

Bindings mapped to the desktop pane use WHEN_ANCESTOR_OF_FOCUSED_COMPONENT. Maybe that is what you want.

Otherwise, if you need more help post your SSCCE that demonstrates the problem.

camickr