Thread View: borland.public.jbuilder.java.swing
6 messages
6 total messages
Started by Nechama Shuchatowitz
Thu, 17 Jul 2003 19:18
how to set tab button to move focus between components
Author: Nechama Shuchatowitz
Date: Thu, 17 Jul 2003 19:18
Date: Thu, 17 Jul 2003 19:18
6 lines
1060 bytes
1060 bytes
How would I set the tab button to move the focus from one component to the next? Also, how would I set a JButton to be 'pressed' when the enter button is pressed? Thanks!
Re: how to set tab button to move focus between components
Author: John McGrath [TeamB]
Date: Fri, 18 Jul 2003 05:31
Date: Fri, 18 Jul 2003 05:31
19 lines
1445 bytes
1445 bytes
On 7/17/2003 at 3:18:23 PM, Nechama Shuchatowitz wrote: > How would I set the tab button to move the focus from one component > to the next? Assuming you mean the tab *key*, it should do that by default. > Also, how would I set a JButton to be 'pressed' when the enter button > is pressed? Bind the Enter key. The JDK docs cover the Key Binding mechanism. You can also find a copy here: http://java.sun.com/j2se/1.4.2/docs/api/index.html -- Regards, John McGrath [TeamB]
Re: how to set tab button to move focus between components
Author: Jacklondon Chen
Date: Mon, 15 Dec 2003 02:36
Date: Mon, 15 Dec 2003 02:36
15 lines
1503 bytes
1503 bytes
In java , there is no "tab order", and the tab order in windows for java application is same as the same order the component added to the container. Jackloncon Chen "Nechama Shuchatowitz" <nshuch@teamgenesis.com> д����Ϣ���� :3f16f5de@newsgroups.borland.com... > How would I set the tab button to move the focus from one component to the > next? > Also, how would I set a JButton to be 'pressed' when the enter button is > pressed? > > Thanks! > >
Re: how to set tab button to move focus between components
Author: Jacklondon Chen
Date: Tue, 16 Dec 2003 02:46
Date: Tue, 16 Dec 2003 02:46
25 lines
1908 bytes
1908 bytes
In swing, you can use setNextFocusableComponent to manual define tab order one by one. this can not do "visible" like Delphi. "Jacklondon Chen" <jacklondon.chen@tom.com> д����Ϣ���� :3fdd1e08$1@newsgroups.borland.com... > In java , there is no "tab order", and the tab order in windows for java > application is same as the same order the component added to the container. > > Jackloncon Chen > > "Nechama Shuchatowitz" <nshuch@teamgenesis.com> �� ? > :3f16f5de@newsgroups.borland.com... > > How would I set the tab button to move the focus from one component to the > > next? > > Also, how would I set a JButton to be 'pressed' when the enter button is > > pressed? > > > > Thanks! > > > > > >
Re: how to set tab button to move focus between components
Author: Lori M Olson (TeamB)
Date: Tue, 16 Dec 2003 16:40
Date: Tue, 16 Dec 2003 16:40
28 lines
2137 bytes
2137 bytes
Jacklondon Chen wrote:
> In swing, you can use setNextFocusableComponent to manual define tab order
> one by one. this can not do "visible" like Delphi.
>
No, you certainly do NOT use setNextFocusableComponent any more. It's
been deprecated since JDK 1.4 was released, so you should not be using
it in new code, and you should be replacing it in old code.
--
Regards,
Lori Olson (TeamB)
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Re: how to set tab button to move focus between components
Author: Jacklondon Chen
Date: Thu, 18 Dec 2003 02:24
Date: Thu, 18 Dec 2003 02:24
36 lines
2239 bytes
2239 bytes
You can use DefaultFocusTraversalPolicy, but I don't like it. This make simple thing complex. "Lori M Olson (TeamB)" <javadragon@techie.com> ??????:3fdf34ef$1@newsgroups.borland.com... > Jacklondon Chen wrote: > > > In swing, you can use setNextFocusableComponent to manual define tab order > > one by one. this can not do "visible" like Delphi. > > > > No, you certainly do NOT use setNextFocusableComponent any more. It's > been deprecated since JDK 1.4 was released, so you should not be using > it in new code, and you should be replacing it in old code. > > -- > > Regards, > > Lori Olson (TeamB) > > ------------ > > Save yourself, and everyone else, some time and search the > newsgroups and the FAQ-O-Matic before posting your next > question. > > Google Advanced Newsgroup Search > http://www.google.ca/advanced_group_search > Other Newsgroup Searches: > http://www.borland.com/newsgroups/ngsearch.html > Joi Ellis's FAQ-O-Matic: > http://www.visi.com/~gyles19/fom-serve/cache/1.html >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads