資源簡介
當點擊運行時就會讀取指定的路經下的文本。
代碼片段和文件信息
import?java.io.*;
import?javax.swing.*;
public?class?Help
{
public?static?void?main(?String?args[]?)?throws?Exception{
File?f?=?new?File(“H:/javapro/files/testwords.txt“);
new?ShowWin(f);
}
}
class?ShowWin?extends?Jframe
{
JTextArea?ta?=?null;?
JScrollPane?jsp?=?null;?
ShowWin(File?file)?throws?Exception?{
this.setVisible(true);
this.setS
- 上一篇:java繪圖程序代碼
- 下一篇:JAVA貪吃蛇源代碼
評論
共有 條評論