This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes how to get the info from a jtextarea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "how to get the info from a jtextarea" Watch "how to get the info from a jtextarea" New topic
Author

how to get the info from a jtextarea

keiyia jackson
Ranch Hand

Joined: Jul 16, 2001
Posts: 49
i want that info placed in a buffer so it can be sent to c++ program and the string parsed using the jni. i am not concerned with the latter part. just want to know how to get the text into a buffer and back out to another text area.
thanks
Juanjo Bazan
Ranch Hand

Joined: Feb 04, 2002
Posts: 231
You can simply get the text from the JTextArea and use it to construct the buffer:
//(I assume jta is a JTextArea)
StringBuffer stB= new StringBuffer(jta.getText());
//..your code to operate with the buffer...
//and insert the text into another JTextArea
JTextArea anotherJTA= new JTextArea(stB.toString());

-HTH
Juanjo
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get the info from a jtextarea
 
Similar Threads
FBNS: convert readUTF to NIO equivalent
how to get the info from a jtextarea
Showing JSP output in XSL
How do I copy and paste to a text file?
input file and output file