我在 Gui 文本区域阅读文件时遇到问题希望你能帮助我解决阅读文件的声明非常感谢
public static javax.swing.JTextArea jTextArea1;
{
BufferedReader br = null;
try {
String sCurrentLine;
br = new BufferedReader(new FileReader("C:\\testing1.txt"));
while ((sCurrentLine = br.readLine()) != null) {
jTextArea1.read(br, "C:\\testing1.txt"); \\the problem is here
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (br != null)br.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}