Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
    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
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Once is enough, thank you. UseOneThreadPerQuestion.
 
You have to be odd to be #1 - Seuss. An odd little ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!