登录
首页 » Java Develop » 窗口上的文本行显示当前文件的路径,文本区用于编辑文件,3个按钮 [打开],[保存…],[另存为…]。 单击[打开]按钮时,弹出打开文件对话框,将选择的文...

窗口上的文本行显示当前文件的路径,文本区用于编辑文件,3个按钮 [打开],[保存…],[另存为…]。 单击[打开]按钮时,弹出打开文件对话框,将选择的文...

于 2023-06-21 发布 文件大小:24.86 kB
0 22
下载积分: 2 下载次数: 1

代码说明:

窗口上的文本行显示当前文件的路径,文本区用于编辑文件,3个按钮 [打开],[保存…],[另存为…]。 单击[打开]按钮时,弹出打开文件对话框,将选择的文件显示在文本区中。 单击[保存…]按钮时,如果当前文件为空,则弹出保存文件对话框,并按设置的文件名保存文件;如果已有文件,则按设置的文件名保存文件。 单击[另存为…]按钮时,则弹出保存文件对话框,并按设置的文件名保存文件。 程序中以字符文件输出流FileWriter的writer方法写入文本区内容,以字符缓冲输入流BufferedReader的readLine()方法按行读取文本文件。 -window on the text line shows the path the current document, the text area for editing documents, three buttons [open] [preservation] [Save as ...]. Click [Open] button, pop open file dialog box, select the document in the text area. Click [preservation] button, if the current document is empty, save dialog pop up, together with a set of documents were preserved; If the document has been, according to the paper were set up to preserve documents. Click [Save as ...] button, the pop-up dialog box to preserve documents, together with a set of documents were preserved documents. Character procedures to document the output stream FileWriter way into the text writer District, characters in the input stream buffer

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696522资源总数
  • 104027会员总数
  • 45今日下载