public void actionPerformed(ActionEvent e) {
          if (filename == null) return;
	          JFileChooser c = new JFileChooser();
	          if (lastPosition == null)
	        	  	c.setCurrentDirectory(new File("."));
	          else
	        	  	c.setCurrentDirectory(new File(lastPosition));
	          c.setAcceptAllFileFilterUsed(false);
	          c.addChoosableFileFilter(new Hfilter());
	          int rVal = c.showSaveDialog(TileMain.f);
	          if (rVal == JFileChooser.APPROVE_OPTION) {
	        	  String dir2 = c.getCurrentDirectory().toString();
	        	  String fn = c.getSelectedFile().getName();
	        	  try {
	        		  SaveLoadImport.saveImage(imViewer.getCachedImage(), imViewer, imMapper, dir2+File.separatorChar+fn, smode, rle);
				} catch (CantSaveException err) {
					JOptionPane.showMessageDialog(f, Utils.lang("errCantSave"));
				}
	        	  lastPosition = dir2;
          }
          if (rVal == JFileChooser.CANCEL_OPTION) {
          }
        }