private void button(){
    	numInd = Integer.parseInt(jTextField1.getText());
    	probMut = Double.parseDouble(jTextField4.getText());
    	enfriamiento = Double.parseDouble(jTextField8.getText());
    	endogamia = Double.parseDouble(jTextField9.getText());
    	numGen = Long.parseLong(jTextField2.getText());
    	reproductionProb = Double.parseDouble(jTextField3.getText());
    	elite = jCheckBox1.isSelected();
    	ifchecked = jCheckBox2.isSelected();
    	prof=Integer.parseInt(jTextField10.getText());
    	
    	Expression.setMaxDepth(prof);
    	
    	Expression.setIfEnabled(ifchecked);
    	
    	item = jComboBox2.getSelectedIndex();
    	if (item==0) selectionMethod = new Tournament(reproductionProb);
    	else if (item==1) selectionMethod = new Roulette(reproductionProb);
    	else if (item==2) selectionMethod = new NonRepeatingRoulette(reproductionProb);
    	else if (item==3) selectionMethod = new SUS(reproductionProb);
    	else selectionMethod = new Ranking(reproductionProb);
    	
    	item = jComboBox4.getSelectedIndex();
    	if (item==1) crossMethod = new RootDepthCross();
        else crossMethod = new RandomDepthCross();

    	item = jComboBox5.getSelectedIndex();
    	if (item==0) repalceMthod = new SurvivalOfTheFittest();
    	else repalceMthod = new ChildrenRepalceParent();
    	
    	item = jComboBox3.getSelectedIndex();
    	switch(item){
    		case 0: mutationMthod = new RootDepthMut(probMut,endogamia,enfriamiento);break;
    		case 1: mutationMthod = new RandomDepthMut(probMut,endogamia,enfriamiento);break;
    		case 2: mutationMthod = new RootBranchingMut(probMut,endogamia,enfriamiento);break;
    		default: mutationMthod = new RandomBranchingMut(probMut,endogamia,enfriamiento);break;
    	}
    	
    	GeneticAlgorithm ga = new GeneticAlgorithm(numGen, 
    			new Population(new MUX4(), numInd, elite),
    			new Reproduction(selectionMethod, crossMethod, repalceMthod), 
    			mutationMthod);

    	Individual bestOne =ga.search();
    	
    	Plot2DPanel plot = new Plot2DPanel();
        plot.removeAllPlots();

        // define the legend position
        plot.addLegend("SOUTH");
        
        // add a line plot to the PlotPanel
        plot.addLinePlot("Mejor Actual", ga.getBstHistory());
        plot.addLinePlot("Media actual", ga.getAvgHistory());
        plot.addLinePlot("Mejor historico", ga.getBstOfAllHistory());
        
        // put the PlotPanel in a JFrame like a JPanel
        jInternalFrame1.setContentPane(plot);
        setVisible(true);
        
        jTextArea1.setText("Expresion: "+bestOne+'\n'+"Aciertos: "+MUX4.hits(bestOne));
    }