private void saveStatsBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveStatsBtnActionPerformed
     if(saveStatsBtn.isSelected()){
    probki=0;        
    //sS=new savingStats();
        //sS.setVisible(true);
       //  statsChooser.setVisible(true);
         if(statsChooser.showSaveDialog(this)==JFileChooser.APPROVE_OPTION)
         {
             mainBoids.mainWin.fSource=statsChooser.getSelectedFile().getAbsolutePath();
             mainBoids.mainWin.savingStats=true;
         }   
         else {mainBoids.mainWin.savingStats=false; mainBoids.mainWin.fSource=null;}

     }else{mainBoids.mainWin.fSource=null;}

    }