private void btnStartActionPerformed(ActionEvent evt) {//GEN-FIRST:event_btnStartActionPerformed
        if(mainBoids.simul==null || mainBoids.simul.continueSimulation==false){
            this.btnStart.setText("Zatrzymaj symulację");
            mainBoids.simul= new symulacja(mainBoids.boids,mainBoids.obs,mainBoids.food);
             mainBoids.simul.setSkala(sldSkala.getValue()/2d);
            mainBoids.simul.setParametrs(sldAliCof.getValue()/(double)1000,sldSepCof.getValue()/(double)1000, sldCohCof.getValue()/(double)1000, sldLeadCof.getValue()/(double)1000,sldPredCof.getValue()/(double)1000, sldAvoidCof.getValue()/(double)1000,sldAvoidMode.getValue()/(double)1000);
            mainBoids.simul.setNeightParametrs(sldAngle.getValue()/(double)1000,sldNeigh.getValue()/(double)10);
            mainBoids.simul.setRandCof(sldRandCof.getValue()/(double)1000);
            mainBoids.simul.setAvoidRec(sldAvoidRec.getValue());
            
            Runnable runner = new threadSym(mainBoids.simul);
            Thread thread = new Thread(runner);
            thread.start();
        }else{
            this.btnStart.setText("Rozpocznij symulację");
            mainBoids.simul.continueSimulation=false;
        }
    }