Exemplo n.º 1
0
 public void saveAs(ActionEvent e) {
   int returnVal = fc.showSaveDialog(this);
   if (returnVal != JFileChooser.APPROVE_OPTION) {
     return;
   }
   file = fc.getSelectedFile();
   save(e);
 }
Exemplo n.º 2
0
 public void loadPuzzle(ActionEvent e) throws NoSuchMethodException {
   int returnVal = fc.showOpenDialog(this);
   if (returnVal != JFileChooser.APPROVE_OPTION) {
     return;
   }
   file = fc.getSelectedFile();
   Map m = new HashMap();
   m.put("file", file);
   mgr.switchScreens(m);
 }
Exemplo n.º 3
0
 public void load(ActionEvent e) {
   int returnVal = fc.showOpenDialog(this);
   if (returnVal != JFileChooser.APPROVE_OPTION) {
     return;
   }
   file = fc.getSelectedFile();
   try {
     InputStream in = new BufferedInputStream(new FileInputStream(file));
     Properties newWl = new Properties();
     newWl.load(in);
     in.close();
     setWordList(newWl);
   } catch (IOException ex) {
     handleException(ex);
   }
 }