public void eventMenuFileSaveAs() {
    int    overwrite = JOptionPane.YES_OPTION;
    JFileChooser chooser;
    int    result;
    File   selectedFile;
    String fileName;

    if ( Data.getInventoryFile() != null ) {

      chooser = new JFileChooser();
      chooser.setFileFilter( new FileNameExtensionFilter( "Inventory files", "xml" ) );
      chooser.setCurrentDirectory( new File( Data.BUILDARIA_DIR ) );

      result = chooser.showSaveDialog( Data.getView() );

      if ( result == JFileChooser.APPROVE_OPTION ) {
        selectedFile = chooser.getSelectedFile();
        fileName = selectedFile.toString();
        if ( !fileName.endsWith( ".xml" ) ) { // if .xml was not included, add it to filename
          fileName = selectedFile.getPath() + ".xml";
        } // if
        selectedFile = new File( fileName );

        if ( selectedFile.exists() ) {
          overwrite = JOptionPane.showConfirmDialog( Data.getView(), 
                                                     Data.OVERWRITE_MSG, 
                                                     Data.CONFIRM_TITLE, 
                                                     JOptionPane.YES_NO_OPTION );
        } // if

        if ( overwrite == JOptionPane.YES_OPTION ) {
          Data.setInventoryFile( selectedFile );
          Data.getView().setupTitle( selectedFile.getName() );
          Data.getView().updateInventory(); 
          saveFile();
          Data.setInventoryClean();
        } // if
      } // if
      
    } // if

  } // eventMenuFileSaveAs -----------------------------------------------------