This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scrolling a JScrollpane with TAB-Key

 
jay cheung
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a UI with buttons and textfield on it.

With the mouse I can scroll the JScrollPane but I can not force
the JScrollPane to scroll if I press the TAB-Key.

How can I force the JScrollPane to scroll to the next JTextField
if I press the TAB-Key?

Thx!
 
jay cheung
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any1 know how to do this?
thx a lot!
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
perhaps focus listeners for the textfields
and in focusGained() you have scrollRectToVisible()
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic