protected void fileOpened(final Project project, File file, Object value) { if (value == null) { project.setFile(file); project.setEnabled(true); getApplication().addRecentFile(file); } else { JSheet.showMessageSheet( project.getComponent(), "<html>" + UIManager.getString("OptionPane.css") + "<b>Couldn't open the file \"" + file + "\".</b><br>" + value, JOptionPane.ERROR_MESSAGE, new SheetListener() { public void optionSelected(SheetEvent evt) { project.clear(); project.setEnabled(true); } }); } }