In my Application there are 5 text fields if i press enter key on first text field i want the control transfer to 2nd text field not using tab i have used key listener for trapping enter key and the Component is JTextField
Joined: Jun 27, 2000
When you trap the enter key, check which text field it was recieved from and then have the next field request the key focus. Or if you will be using fields like this alot and want this feature, subclass the JTextField and include a field that knows the next component you want to receive the keyfocus. Then when you "enter", the current component knows who to tell to request the keyfocus without external coding...