public static JPanel createControlPanel(ControlSimulation cs) {
		//for visualization
		//for creating new BarChart with inputed cycle
		JPanel controlPanel = new JPanel(new BorderLayout());
		JPanel barPanel = new JPanel(new FlowLayout());
		_nextButton = new JButton();
		_textField = new JTextField(3);
		_textField.setText(new Integer(cs.p.cycleforbar).toString());
		_textField.addKeyListener(new KeyListener() {

			@Override
			public void keyPressed(KeyEvent e) { }

			@Override
			public void keyReleased(KeyEvent e) { }

			@Override
			public void keyTyped(KeyEvent e) {
				if (e.getKeyChar() == '\n') _nextButton.doClick();
			}
			
		});
		_nextButton.setText("Get Barchart");
		_nextButton.addActionListener(new BarButtonActionListener(cs, _textField, controlPanel));
		
		JLabel jl = new JLabel("Cycle # for a new Barchart: ");
		
		barPanel.add(jl);
		barPanel.add(_textField);
		barPanel.add(_nextButton);
		
		controlPanel.add(barPanel,BorderLayout.WEST);
		barPanel.setVisible(true);
		
		_textField.requestFocus();
		
		//for setting new experiments with inputed parameters
		NumberFormat formatter = NumberFormat.getInstance(Parameter.LOC);
		formatter.setMaximumFractionDigits(2);
		
		
		JPanel paraPanel = new JPanel(new FlowLayout());
		paraButton = new JButton();
		cycleTextField = new JTextField(3);
		cycleTextField.setText(new Integer(cs.p.maxCycles).toString());
		cycleTextField.addKeyListener(new KeyListener() {

			@Override
			public void keyPressed(KeyEvent e) { }

			@Override
			public void keyReleased(KeyEvent e) { }

			@Override
			public void keyTyped(KeyEvent e) {
				if (e.getKeyChar() == '\n') paraButton.doClick();
			}
			
		});
		
		storeTextField = new JTextField(3);
		storeTextField.setText(new Integer(cs.p.storeSize).toString());
		storeTextField.addKeyListener(new KeyListener() {

			@Override
			public void keyPressed(KeyEvent e) { }

			@Override
			public void keyReleased(KeyEvent e) { }

			@Override
			public void keyTyped(KeyEvent e) {
				if (e.getKeyChar() == '\n') paraButton.doClick();
			}
			
		});
		
		populationTextField = new JTextField(3);
		populationTextField.setText(new Integer(cs.p.populationSize).toString());
		populationTextField.addKeyListener(new KeyListener() {

			@Override
			public void keyPressed(KeyEvent e) { }

			@Override
			public void keyReleased(KeyEvent e) { }

			@Override
			public void keyTyped(KeyEvent e) {
				if (e.getKeyChar() == '\n') paraButton.doClick();
			}
			
		});
		
		gaussianTextField = new JTextField(4);
		gaussianTextField.setText(formatter.format(cs.p.gaussianStdDev));
		gaussianTextField.addKeyListener(new KeyListener() {

			@Override
			public void keyPressed(KeyEvent e) { }

			@Override
			public void keyReleased(KeyEvent e) { }

			@Override
			public void keyTyped(KeyEvent e) {
				if (e.getKeyChar() == '\n') paraButton.doClick();
			}
			
		});
		
		pmeTextField = new JTextField(4);
		pmeTextField.setText(formatter.format(cs.p.PMEpercent));
		pmeTextField.addKeyListener(new KeyListener() {

			@Override
			public void keyPressed(KeyEvent e) { }

			@Override
			public void keyReleased(KeyEvent e) { }

			@Override
			public void keyTyped(KeyEvent e) {
				if (e.getKeyChar() == '\n') paraButton.doClick();
			}
			
		});
		
		paraButton.setText("New Simulation");
		paraButton.addActionListener(new ParaButtonActionListener(cs, cycleTextField, storeTextField, populationTextField, gaussianTextField, pmeTextField, _textField, controlPanel));
		JLabel ctfL = new JLabel("MaxCycle:");
		JLabel stfL = new JLabel("Storage:");
		JLabel ptfL = new JLabel("Population:");
		JLabel gtfL = new JLabel("GaussianSD:");
		JLabel pmetfL = new JLabel("PMEpercent:");
		
		paraPanel.add(ctfL);
		paraPanel.add(cycleTextField);
		paraPanel.add(stfL);
		paraPanel.add(storeTextField);
		paraPanel.add(ptfL);
		paraPanel.add(populationTextField);
		paraPanel.add(gtfL);
		paraPanel.add(gaussianTextField);
		paraPanel.add(pmetfL);
		paraPanel.add(pmeTextField);
		
		paraPanel.add(paraButton);
		
		controlPanel.add(paraPanel,BorderLayout.EAST);
		paraPanel.setVisible(true);
		
		JPanel comboPanel = new JPanel(new FlowLayout());
		@SuppressWarnings({ "rawtypes", "unchecked" })
		JComboBox cycleTypeBox = new JComboBox(Parameter.cycleType);
		cycleTypeBox.addActionListener(new ComboBoxActionListener(cs));
		
		JLabel ctbL = new JLabel("CycleType:");
		
		comboPanel.add(ctbL);
		comboPanel.add(cycleTypeBox);
		controlPanel.add(comboPanel,BorderLayout.CENTER);
		comboPanel.setVisible(true);
		
		return controlPanel;
		
	}