Bookmark Topic Watch Topic
  • New Topic

Enter key functionality on JTextField

 
Rajesh k Jha
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hello to everyone,

I have one problem with the functionality of Enter key on JTextField.
Actually i have one "Form" where i have used JPanel which is scrollable, so to fill complete form i have to use scrollbar.
Now what i want is on press of "enter key",
i) Focus should transfer to the next textfield.
ii) And at the same time it should scroll down to show the next textfield.
I have achieved the focus functionality of JtextField to transfer the focus on the next TextField but not getting solution of scrolling down.

For review i am posting my code.

This code is to move the focus to the next JTextField



Now what to add extra code to Scroll down ?
 
Rob Spoor
Sheriff
Pie
Posts: 20493
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Once is enough, thank you. UseOneThreadPerQuestion.
 
    Bookmark Topic Watch Topic
  • New Topic