Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JTextArea BufferedReader implmentation for read/write

843804Jan 7 2005 — edited Jan 7 2005
I am curious how would I read using BufferedReader inside JTextArea

For example:
JTextArea output;
int id;
BufferedReader in = new BufferedReader 
         (new InputStreamReader (System.in));

output.setText("Enter your  ID please: ");
id = Integer.parseInt (in.readLine()); // <-- would have worked if this was a standard console window
// How do I do the same as above just inside a JTextArea
Thanks guys
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 4 2005
Added on Jan 7 2005
3 comments
143 views