public void init()
{
// 创建属性
autoWrap = new JCheckBoxMenuItem("自动换行");
frame = new JFrame("记事本");
layout = new BorderLayout();
bar = new JMenuBar();
menuFile = new JMenu("文件");
fileNew = new JMenuItem("新建");
fileOpen = new JMenuItem("打开");
fileSave = new JMenuItem("保存");
fileOtherSave = new JMenuItem("另存为");
filePageSet = new JMenuItem("页面设置");
filePrint = new JMenuItem("打印");
fileExit = new JMenuItem("退出");
menuEdit = new JMenu("编辑");
editCancel = new JMenuItem("撤销");
editCut = new JMenuItem("剪切");
editCopy = new JMenuItem("复制");
editPaste = new JMenuItem("粘贴");
editDelete = new JMenuItem("删除");
editSearch = new JMenuItem("查找");
editReplace = new JMenuItem("替换");
editGItem = new JMenuItem("转到");
editAItem = new JMenuItem("全选");
editDItem = new JMenuItem("时间/日期");
menuForruat = new JMenu("格式");
forruatFont = new JMenuItem("字体");
menuView = new JMenu("查看");
viewSJMenu = new JMenuItem("状态栏");
menuHelp = new JMenu("帮助");
helpHItem = new JMenuItem("查看帮助");
helpAboutNtepad = new JMenuItem("关于记事本");
area = new JTextArea();
scroll = new JScrollPane(area, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
JFileChooser chooser;
FileReader read;
FileWriter writer;