This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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]);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying a file contents in TextArea of a GUI