From the code snippet, it appears that you have a dedicated Help button. In which case, why wouldnt you only assign the help Action to that one button? Why do you think you might need to add it to all the components?
Some random thoughts (untested):
Alternatively, if you removed the help button, you could assign this Action to any component - as long as a component reacts to the F1 action, you should be able to get your online help. (Doing this is non-intuitive though, both for the user and for the reader of the code, so you would have to really decide whether it is worthwhile or not).
Another alternative (but getting way beyond the assignment requirements) might be to assign the help action to all the components, which might give you context specific help.
Originally posted by Barry Gaunt: perhaps it is better to post a question like this in our Swing/AWT forum
If you would like me to move this question to that forum, just say so.
Oliver, on re-reading my previous post, I realised that it could be misinterpreted. I did not mean that such a topic is unwelcome, I meant to point out that for technical issues such as function key handling expert help is available in the Swing forum if you need it.
my comment is a little bit late, because I was out of order.
I solve the proble by the following code
The main think was the getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT). This statement works on all widgets. Because my Dialog has no menu bar, but the F1 key should work on all widgets, I need this functionalaty.