package gui;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;


/**
 * 
 * @author jasonfortunato
 * @author linneasahlberg
 */
public class MutationPane extends EvoPane {

	JLabel mutLabel,					// Mutation (0 to 1)
		mutAtoBLabel, mutBtoALabel;
	JTextField mutAtoB, mutBtoA;
	
	public MutationPane(){
		
		super();
		
		// Mutation (0 to 1)
		mutLabel = new JLabel("Mutation (0 to 1): ");
		mutAtoBLabel = new JLabel("A to B: ");
		mutBtoALabel = new JLabel("B to A: ");
		mutAtoB = new JTextField(TEXT_LEN_SHORT);
		mutBtoA = new JTextField(TEXT_LEN_SHORT);
		
		c.gridx = 0; c.gridy = 1;
		c.anchor = GridBagConstraints.WEST;
		add(mutLabel, c);
		
		// add label then field x3
		c.gridx = 1; c.gridy = 2;
		c.gridwidth = 1;
		c.anchor = GridBagConstraints.CENTER;
		add(mutAtoBLabel, c);
		c.gridx = 1;
		c.anchor = GridBagConstraints.EAST;
		add(mutAtoB, c);
	
		c.gridx = 2;
		c.anchor = GridBagConstraints.CENTER;
		add(mutBtoALabel, c);
		c.gridx = 2;
		c.anchor = GridBagConstraints.EAST;
		add(mutBtoA, c);
		
	}

	
	public static void main(String[] args){
		JFrame window = new JFrame();
		
		MutationPane test = new MutationPane();
		
		window.add(test);
		window.pack();
		window.setVisible(true);
		
	}

}

@@ -188,16 +188,39 @@
 Field;%0A%0A
+import shared.Allele;%0A%0A
 %0A/**%0A * 
@@ -1172,16 +1172,229 @@
 %0A%09%09%0A%09%7D%0A%0A
+%09public void submit(shared.SessionParameters p) %7B%0A%09%09p.setMutationRate(Allele.A, Allele.B, Double.parseDouble(mutAtoB.getText()));%0A%09%09p.setMutationRate(Allele.B, Allele.A, Double.parseDouble(mutBtoA.getText()));%0A%09%7D%0A
 %09%0A%09publi

Set up MutationPane with sesh parms