The file menu now contains the standard Open, Save As and Recent Files entries. Please note that the recent file group is disabled until at least on file has been opened or saved.
The Save As command doesn't actually save anything, so you can test it out. Make sure you try saving over a file that already exists, and that you try a file name without an extension.
All the behaviour provided by the demo is implemented with the following code.
// create the recent file group recentFileGroup = new AbstractRecentFileGroup("file-page.recent-files") { public void openFile(File file) { JOptionPane.showMessageDialog(FileDemoPanel.this, "You've chosen to re-open \"" + file.getName() + "\""); } }; // allow the user to clear the list recentFileGroup.getClearCommand().setVisible(true); recentFileGroup.export(); // creates some file filters for the open and save commands.. ExtensionFileFilter[] filters = { new ExtensionFileFilter("txt", "*.txt"), new ExtensionFileFilter("xml", "*.xml"), }; fileOpen = new AbstractFileOpenCommand("file-page.open", filters) { { // configure the default settings. setAcceptAllFileFilterUsed(true); setMultiselectionEnabled(false); setRememberLastFilter(true); setCenterOnInvoker(false); } protected void performOpen(File[] files) { // we only have single selection enabled. JOptionPane.showMessageDialog(FileDemoPanel.this, "You've chosen to open \"" + file.getName() + "\""); recentFileGroup.add(files[0]); } }; fileOpen.export(); saveAs = new AbstractSaveAsCommand("file-page.save-as", filters) { { // configure the default settings. setAcceptAllFileFilterUsed(false); setCenterOnInvoker(false); } protected void performSave(File file) { JOptionPane.showMessageDialog(FileDemoPanel.this, "Normally I'd be saving the file to \"" + file.getName() + "\", " + "but since it's a demo I'll skip it"); recentFileGroup.add(file); } }; saveAs.export();