File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes How to Get a String from a Text Area? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to Get a String from a Text Area?" Watch "How to Get a String from a Text Area?" New topic
Author

How to Get a String from a Text Area?

mohan69
Greenhorn

Joined: Oct 04, 2000
Posts: 1
Hi all,
I have encountered a small problem in my coding. Iam able to opena file into a text area. Now I need to get each line (One at a time) into a Dialog box, which has a textarea/textfeild, and two buttons "Yes" and "No" which when clicked get the next line. Iam able to open the Dialog box but I don't know how to get each line into the Dialogbox. Also once the dialog box is opened Iam unable to close it. The only thing that closes the Dialogbox is completely closing the application.
Could anybody please solve my problem.
Thanx,
-Parwez
Bob Kerfoot
Ranch Hand

Joined: Oct 01, 2000
Posts: 47
Parwez,
I would probably use a "LineNumberReader" and the "readLine()" method which returns "a String containing the contents of the line, not including any line-termination characters, or null if the end of the stream has been reached".
Hope this helps,
Bob Kerfoot - SCJP
Manish Joshi
Greenhorn

Joined: Oct 16, 2000
Posts: 16
Dear You say that You can open up a dialog box Couldnot close it For closing you will have to write method and implement some of the listeners evnt handling interfaces please do go through JavaDocs of the packages as java.awt.event.*;
You will have to write a corresponding implemnted method for refering the close button in that write a command to hide that dialog box simple
Secondly to read One One line First cover your FileReader Object with BufferedReader object and then invoke methods like readLine();
so easily
javaexams@yahoo.com
Manish-India
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Get a String from a Text Area?
 
Similar Threads
how to deploy a Swing Applet that accesses the System Clipboard
New at this...need help
Please Help
Help with JDialog Close Operation
JColorChooser and StyledEditorKit foreground