• Post Reply Bookmark Topic Watch Topic
  • New Topic

TO get focus of a specified field on tab

 
Deboleena Chakraborty
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a panel and 3 text boxs and 3 labels. 2 labels and 2 text boxes are visible when the panel is visible. The third can be seen if the panel is scrolled. But what i want is that when i tab out of the 2 nd text box the third text box should be seen i.e. the panel should scroll automatically and the focus should go at the place of the cursor.What should I do?
Regards
Deboleena
[ May 10, 2004: Message edited by: Deboleena Chakraborty ]
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use a FocusListener with the JComponent method scrollRectToVisible.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!