The Artima Developer Community
Sponsored Link

Legacy Design Forum
Designing with Interfaces



This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Design Question

Posted by pandu on April 04, 2001 at 2:47 PM


Below I have some problem in the coding, please go through into
code and my
explaination. Please give me max help to solve this problem.

/* focusTabOrder */

1 intial_textfiled.setNextFocusableComponent(textfiled1);
2 textfiled1.setNextFocusableComponent(textfiled2);
3 textfiled2.setNextFocusableComponent(textfiled3);
4 textfiled3.setNextFocusableComponent(textfiled4);
5 textfiled4.setNextFocusableComponent(textfiled5);
6 textfiled5.setNextFocusableComponent(textfiled6);
7 textfiled6.setNextFocusableComponent(textfiled7);
8 textfiled7.setNextFocusableComponent(textfiled8);
9 textfiled8.setNextFocusableComponent(textfiled9);
10 textfiled9.setNextFocusableComponent(textfiled10);
11 textfiled10.setNextFocusableComponent(textarea1);
12 textarea1.setNextFocusableComponent(intial_textfiled);

The input of the starts from intial_textfiled(line no.1)
automatically first time
and each tab pressing cursor moves to next flied. Once completing
all inputs again
cursor must go from line no.12 to line no. 1 back for next inputs.
But cursor not
come out from textarea1 if we press tab. Instead of coming out from
textarea1, its
creating horizontal and vertical scroll bars. Here eaxctly I want
write a seperate
calss with implemeting key listners. This class I would like to
write and keep into
seperate package and whenever I want I call this class into my main
program. Please
let give some idea to control tab key in the text area.

I hope solution for above my problem.

Thank you very much in advance.



Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us