I am trying to read the data in a file and print it to a new Jtext area. This line:
is where I recieve this error:
cannot find symbol variable JTextArea.
I am stumped!
this.JTextArea.append(read);
is where I recieve this error:
cannot find symbol variable JTextArea.
I am stumped!
public class ReadFile
{
BufferedReader in;
String read;
String output;
JTextArea show;
public ReadFile()
{
JTextArea show = new JTextArea();
try
{
//open a buffered reader to file
in = new BufferedReader(new FileReader("ContactData.txt"));
while ((read = in.readLine()) != null) {
this.JTextArea.append(read);
}
}
catch(IOException f)
{
System.out.println("There is a problem." + f);
}
}
}