Isn't there some way that the top level component can always see key
events for it or any sub component? That's all I really need. I just
want all events to go to my top level component.
Thanks.
--
Kenneth P. Turvey <kt-u...@squeakydolphin.com>
http://www.electricsenator.net
Duct tape is like the force. It has a light side, and a dark side,
and it holds the universe together ...
-- Carl Zwanzig
> I have an applet that loads a component that uses any number of other
> components internally. When it is first running the component gets the
> KeyPressed events that I want it to, but then after doing anything with
> the mouse, it no longer gets these events. I think that the focus must
> be on one of the sub-components, but I don't know which one. I've tried
> setting everything to not be focusable, but I must be missing something.
>
> Isn't there some way that the top level component can always see key
> events for it or any sub component? That's all I really need. I just
> want all events to go to my top level component.
>
> Thanks.
Another possibility is a way to set mnemonics to answer to Ctrl-whatever
instead of alt-whatever.
Thanks.
--
Kenneth P. Turvey <kt-u...@squeakydolphin.com>
http://www.electricsenator.net
The only two things that are infinite in size are the universe and
human
stupidity. And I'm not completely sure about the universe.
-- Albert Einstein
> I have an applet that loads a component that uses any number of other
> components internally. When it is first running the component gets the
> KeyPressed events that I want it to, but then after doing anything with
> the mouse, it no longer gets these events. I think that the focus must
> be on one of the sub-components, but I don't know which one. I've tried
> setting everything to not be focusable, but I must be missing something.
[...]
Might this be relevant: "In general, pressing the Tab key moves focus
through the major components; Shift-Tab moves through the components in
the reverse direction. Control-Tab and Control-Shift-Tab work in a
similar fashion and are necessary when keyboard focus is in an element
that accepts tabs, such as a text area."
<http://java.sun.com/products/jlf/ed2/book/HIG.Behavior3.html>
--
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews
> Might this be relevant: "In general, pressing the Tab key moves focus
> through the major components; Shift-Tab moves through the components in
> the reverse direction. Control-Tab and Control-Shift-Tab work in a
> similar fashion and are necessary when keyboard focus is in an element
> that accepts tabs, such as a text area."
>
> <http://java.sun.com/products/jlf/ed2/book/HIG.Behavior3.html>
This wasn't the problem. My initial attempts to get this to work were
correct, but I missed a key step. Basically I called setFocusable(false)
on each of the components in my applet. This included a toolbar. What I
didn't do is to call setFocusable(false) on each of the buttons in the
toolbar. Once I did this, the app worked as expected.
Thanks for your suggestion.
--
Kenneth P. Turvey <kt-u...@squeakydolphin.com>
http://www.electricsenator.net
The only two things that are infinite in size are the universe and
You can do that recursively, you know...
--
DF.
Good point. That would probably be the way to go. I'm not getting paid
anymore for this project, but in the future that's probably how I'll do
it.
Thanks.
--
Kenneth P. Turvey <kt-u...@squeakydolphin.com>
http://www.electricsenator.net
I took the initiative in creating the Internet.
-- Al Gore