aspose file tools*
The moose likes Beginning Java and the fly likes Displaying a file contents in TextArea of a GUI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Displaying a file contents in TextArea of a GUI" Watch "Displaying a file contents in TextArea of a GUI" New topic
Author

Displaying a file contents in TextArea of a GUI

Ahmed Mohamed
Greenhorn

Joined: Oct 25, 2004
Posts: 8
hi friends,
can any one direct me in how to display the contents of a file in a textArea of a GUI.....for example

the program should read a paragraph from a file ...this paragraph should be displayed in the TextArea in the GUI which is designed previously....how do i do that...?

THANKS
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
after you've read in/separated the part of the file you want
textArea.setText([paragraph]);

or, if you want to add it after the current text in the text area
textArea.append([paragraph]);
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Displaying a file contents in TextArea of a GUI