用Java编写有读取和保存文本功能的记事本程序
import java.awt.*;
import java.awt.event.*;
import javax.naming.InitialContext;
import javax.swing.*;
import javax.swing.filechooser.*;
import java.io.*;
public class NO_5_Text extends JFrame implements ActionListener{
JFileChooser file;
JMenu menu;
JMenuBar menuBar;
JMenuItem save,open;
JTextArea text;
FileReader fileReader;
FileWriter fileWriter;
BufferedReader in;
BufferedWriter out;
public NO_5_Text()
{
init();
setBounds(100, 100, 900, 700);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);