資源簡(jiǎn)介
當(dāng)點(diǎn)擊運(yùn)行時(shí)就會(huì)讀取指定的路經(jīng)下的文本。
代碼片段和文件信息
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貪吃蛇源代碼
評(píng)論
共有 條評(píng)論