Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #4002 > unrolled thread
| Started by | "Kenneth P. Turvey" <kenneth.p..turvey@THRWHITE.remove-dii-this> |
|---|---|
| First post | 2011-04-27 15:48 +0000 |
| Last post | 2011-04-27 15:48 +0000 |
| Articles | 6 — 3 participants |
Back to article view | Back to comp.lang.java.gui
Keyboard focus getting lo "Kenneth P. Turvey" <kenneth.p..turvey@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
Re: Keyboard focus gettin "Kenneth P. Turvey" <kenneth.p..turvey@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
Re: Keyboard focus gettin "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
Re: Keyboard focus gettin "Kenneth P. Turvey" <kenneth.p..turvey@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
Re: Keyboard focus gettin "Daniele Futtorovic" <daniele.futtorovic@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
Re: Keyboard focus gettin "Kenneth P. Turvey" <kenneth.p..turvey@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
| From | "Kenneth P. Turvey" <kenneth.p..turvey@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:48 +0000 |
| Subject | Keyboard focus getting lo |
| Message-ID | <48a68ca2$0$2196$ec3e2dad@news.usenetmonster.com> |
To: comp.lang.java.gui
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.
--
Kenneth P. Turvey <kt-usenet@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
---
* Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [next] | [standalone]
| From | "Kenneth P. Turvey" <kenneth.p..turvey@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:48 +0000 |
| Subject | Re: Keyboard focus gettin |
| Message-ID | <48a68cde$0$2196$ec3e2dad@news.usenetmonster.com> |
| In reply to | #4002 |
To: comp.lang.java.gui
On Sat, 16 Aug 2008 08:15:31 +0000, Kenneth P. Turvey wrote:
> 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-usenet@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
---
* Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [next] | [standalone]
| From | "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:48 +0000 |
| Subject | Re: Keyboard focus gettin |
| Message-ID | <nospam-B387EB.22454816082008@aioe.org> |
| In reply to | #4002 |
To: comp.lang.java.gui In article <48a68ca2$0$2196$ec3e2dad@news.usenetmonster.com>, "Kenneth P. Turvey" <kt-usenet@squeakydolphin.com> wrote: > 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 --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [next] | [standalone]
| From | "Kenneth P. Turvey" <kenneth.p..turvey@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:48 +0000 |
| Subject | Re: Keyboard focus gettin |
| Message-ID | <48a89e45$0$2234$ec3e2dad@news.usenetmonster.com> |
| In reply to | #4002 |
To: comp.lang.java.gui
On Sat, 16 Aug 2008 22:46:03 -0400, John B. Matthews wrote:
> 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-usenet@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
---
* Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [next] | [standalone]
| From | "Daniele Futtorovic" <daniele.futtorovic@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:48 +0000 |
| Subject | Re: Keyboard focus gettin |
| Message-ID | <g8a7in$v5$1@registered.motzarella.org> |
| In reply to | #4012 |
To: comp.lang.java.gui On 17/08/2008 23:55, Kenneth P. Turvey allegedly wrote: > 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. You can do that recursively, you know... -- DF. --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [next] | [standalone]
| From | "Kenneth P. Turvey" <kenneth.p..turvey@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:48 +0000 |
| Subject | Re: Keyboard focus gettin |
| Message-ID | <48a8b586$0$2205$ec3e2dad@news.usenetmonster.com> |
| In reply to | #4002 |
To: comp.lang.java.gui
On Mon, 18 Aug 2008 00:09:29 +0200, Daniele Futtorovic wrote:
> On 17/08/2008 23:55, Kenneth P. Turvey allegedly wrote:
>> 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.
>
> You can do that recursively, you know...
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-usenet@squeakydolphin.com>
http://www.electricsenator.net
I took the initiative in creating the Internet.
-- Al Gore
---
* Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.gui
csiph-web