• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Control transfer between Two Textareas

 
madhesh raj
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have doubt in AWT. How to transfer cursor control between two Textareas in the same panel? Also how do i make the user give input in one textarea and read it in the other textarea.
Any help will be greatly appreciated
Regards
Madhesh
 
p sata
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
dont about cursor....
but second one i can help u
have some event(action)
In that event get text from first text area and at same time set that text in second area ...
I hope u got what i am trying to say
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to add listeners to the textarea's and then when you are notified of an event in the textarea you can stop and do stuff (like changing the contents of the other textarea).
To transfer control, when you are notified of an event you can change the focus.
[This message has been edited by Cindy Glass (edited April 02, 2001).]
 
madhesh raj
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for ur suggestions. How do i actually transfer the focus to a particular textarea or textbox. The API transferFocus just transfers the focus to the next element in the focus order.
Madhesh
 
madhesh raj
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for ur suggestions. How do i actually transfer the focus to a particular textarea or textbox. The API transferFocus just transfers the focus to the next element in the focus order.
Madhesh
 
Angela Lamb
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Call requestFocus() on the TextArea.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic