HI

I'm very new to java. I have multiple JTextfields(about 11) on my JFrame. They are arranged in 1 column down my Frame. I would like to know how to move from the first JTextfield to the JTextfield of my choice(eg.It must move from 1st JTextfiled to the 5th JTextfield and then to 7th) when I press the enter KEY or tab KEY.

I think i have to use a focusListener.

Any help would be great!!

I think you could use something like this:

textField1.requestFocus();

You can use JTextField.setNextFocusableComponent(Component). :lol:

Thanks for the info. It worked perfectly!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.