|
-
Mar 8th, 2002, 03:28 PM
#1
Thread Starter
Member
reading a file
What is the easies way to put the contents of a text file into a JTextArea? This is what I got so far.
try{
FileReader in = new FileReader(fileChooser.getSelectedFile());
int c;
textBox.setText("");
while ((c = in.read()) != -1) {
}
in.close();
}catch(java.io.IOException f){
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|