Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

focus in textarea

 
RameshKumar MuthuKumar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm using two screens,
in the second one i use one textarea.
when i press continue button in the first page the focus should be on that textarea.
its working nicely.
when i use the go back button in the second page,all the fields in the second page should be cleared and first page should come.
its also working nicely,
the problem is when i again press continue the second page is showed but the focus went somewhere.....
i dont know why,
and when i skip the clearing coding for the textarea i'm getting the focus...
so whats the problem with clearing the textfield???
anyone pls tell me the solution
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> anyone pls tell me the solution

try adding this line at the end of your 'continue' method
[textArea].requestFocusInWindow();

if still not working, post a small sample program that demonstrates the problem
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic