open.setMnemonic(KeyEvent.VK_O);
open.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
Chooser chooser = new Chooser();
chooser.addChoosableFileFilter(new FileNameExtensionFilter("XML Files", "xml"));
if (chooser.showOpenDialog(frame) == JFileChooser.APPROVE_OPTION) {
try {
survey.loadXMLAnswers(chooser.getSelectedFile().getAbsolutePath());
} catch (IOException e) {
//TODO: i18n this error message
JOptionPane.showMessageDialog(frame, e.getMessage(), survey.getTitle(), JOptionPane.ERROR_MESSAGE);