[摘要]Open 事件处理器中的 if() 语句: // Display the name of the opened directory+file in the statusBar. status...
Open 事件处理器中的 if() 语句:
// Display the name of the opened directory+file in the statusBar.
statusBar.setText("Opened "+jFileChooser1.getSelectedFile().getPath());
// Code will need to go here to actually load text
// from file into JTextArea.
with this new openFile() method instead, using the concatenated
Directory and File name.
// Call openFile to attempt to load the text from file into JTextArea
openFile(jFileChooser1.getSelectedFile().getPath());
//repaints menu after item is selected
this.repaint();
添加一个保存文件的菜单项 在选择File
关键词:JBuilder 9 开发一个文本编辑器