need to display in jtextarea
807605Jul 26 2007 — edited Aug 1 2007i have the following program but i need to edit it in order to open the text file and display its contents in a jtextarea anyone know how i could do this
import java.io.*;
//this is a cprogram i have created so the users data entered into my main program can be read in a text file
class cdetailreader
{
public static void main (String args[])
{
int input;
try
{
// I have created a filereader to read the contents of the text file i created to hold customer data
// In my main program i named the text file to store customer details cdetails.txt
FileReader readcdetails = new FileReader("cdetails.txt");
input = readcdetails.read();
while (input >=0)
{
System.out.print ((char) input);
input = readcdetails.read();
}
}
catch(Exception e){
System.out.println("File does not exist"+e);
}
}
}