• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to customize focus traversal through tab key  RSS feed

 
Abhimanyus singh
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i'm facing a problem in controlling the focus traversal mechanism inside a jframe...as i want the focus to travel from top to bottom by pressing tab key regularly , but it travels left to right and then top to bottom through the textfields...
the form looks like
textfield1 textfield4

textfield2 textfield5

textfield3
the focus travels from 1 to 4 , 2 to 5 and then rests at 3. but i want it to be like from 1 to 2 to 3 and then 4 and 5....
Please help...
 
Abhimanyus singh
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help guys....
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abhimanyus singh wrote:please help guys....

PatienceIsAVirtue

Check out http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html which has a section on customizing focus traversal
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And in future, when you're waiting for somebody to answer your question, you could idly type something like "java focus tutorial" into your favourite web search engine and produce the same result. Give a try, you might find you like it!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!