Accelerators in one frame being activated from another  
Author Message
Cameron McCormack





PostPosted: 2005-3-10 18:36:00 Top

java-programmer, Accelerators in one frame being activated from another Hi.

I have a program that uses multiple top-level frames. One of the frames
is the "main" one and contains a menu bar and tool bar. The menu items
in the main frame have accelerators. I want the actions associated with
these menu items to be activated even if the accelerator is pressed when
one of the other top-level frames has the focus.

Is there an easy way or accepted idiom to do this?

Thanks,

Cameron

--
e-mail : cam (at) mcc.id.au icq : 26955922
web : http://mcc.id.au/ msn : cam-msn (at) aka.mcc.id.au
office : +61399055779 jabber : heycam (at) jabber.org
 
Daniel Grieves





PostPosted: 2005-3-11 5:37:00 Top

java-programmer >> Accelerators in one frame being activated from another I haven't tried this but I think you would have to place the Action in the
ActionMap of each Frame individually, then place the Action's accelerator in
the input map for that frame.

Dan

"Cameron McCormack" <"See signature for e-mail address:;"> wrote in message
news:email***@***.com...
> Hi.
>
> I have a program that uses multiple top-level frames. One of the frames
> is the "main" one and contains a menu bar and tool bar. The menu items
> in the main frame have accelerators. I want the actions associated with
> these menu items to be activated even if the accelerator is pressed when
> one of the other top-level frames has the focus.
>
> Is there an easy way or accepted idiom to do this?
>
> Thanks,
>
> Cameron
>
> --
> e-mail : cam (at) mcc.id.au icq : 26955922
> web : http://mcc.id.au/ msn : cam-msn (at) aka.mcc.id.au
> office : +61399055779 jabber : heycam (at) jabber.org