This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Applets and the fly likes does a JTextArea need some event listener? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "does a JTextArea need some event listener?" Watch "does a JTextArea need some event listener?" New topic
Author

does a JTextArea need some event listener?

Clayton Cramer
Ranch Hand

Joined: Aug 26, 2010
Posts: 41
I can get my applet to display text passed to it fine, but if I make changes in the JTextArea, when I hit the OK button, getSelectedText() returns nothing--not even the text that I put into it at the start. My guess is that there is something equivalent to an actionlistener (although it isn't that for JTextArea) that takes some action on the text.



Clayton Cramer
Ranch Hand

Joined: Aug 26, 2010
Posts: 41
getSelectedText returns only that text you selected; getText is the method that I needed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: does a JTextArea need some event listener?
 
Similar Threads
container not appearing
method calls
Applet focus problem, I think
build applet from existing application
determining minimum dimensions of an Applet