//==============================================================================
// The Society of Actuaries (SOA) makes this computer model and its computer
// code available to its members for educational purposes. The model and its
// code may be modified and redistributed without prior authorization from the
// SOA. The SOA distributes this computer model and its computer code in the
// hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE.
//==============================================================================

package implementation;

import java.awt.*;
import java.awt.event.*;

import javax.swing.*;
import javax.swing.event.*;

import resources.Constants;

public class UserPanelTab_Person extends JPanel
{
	private static final long serialVersionUID = 2L;

	String 	text_Labels, text_LabelsOn, text_LabelsOff;
	JLabel 	label_Title,
			label_A1, label_B1, label_B1a,
			label_C1, label_C2, label_C3, label_C4,
			label_D1, label_D2, label_D3, label_D4,
			label_E1, label_E2, label_E3,
			label_F1, label_F2, label_F3, label_F4,
			label_G1, label_G2,
			label_H1,
			label_I1, label_I2, label_I3;
	JButton component_A1;
	JSlider component_B1;
	
	@SuppressWarnings("rawtypes")
    JComboBox component_C1, component_D2, component_E1, component_F2;
	JTextField 	component_C2, component_C3, component_C4,
				component_D1, component_D3, component_D4,
				component_E2, component_E3,
				component_F1, component_F3, component_F4,
				component_G1, component_G2,
				component_H1, component_H2, component_H3;
	
	@SuppressWarnings({ "unchecked", "rawtypes" })
    public UserPanelTab_Person()
	{
		// Set the layout manager for the pane to be a "grid bag".
		// Grid bag is a flexible and easily modifiable layout format.		
		// (see: www.ugrad.cs.ubc.ca/~cs219/CourseNotes/Swing/swing-LayoutManagers-GridBag.html)
		// The Person panel has two columns.
		GridBagLayout gridBagLayout = new GridBagLayout();
		setLayout(gridBagLayout);

		// Title label
		label_Title = new JLabel("<html><b><i>Detailed parameters for Person agents</i></b><br>" +
                "<font color=\"blue\">(After making a change, be sure to press ENTER.)</font></html>");
		GridBagConstraints c = new GridBagConstraints();
		c.gridx 		= 0;
		c.gridy 		= 0;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,10,10,0);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_Title, c);
		add(label_Title);		

		// A1 label
		label_A1 = new JLabel("A1. Press to toggle Person labels:");
		label_A1.setToolTipText("Press the button to toggle on/off the identification labels for Person agents on the display.");
		c.gridx 		= 0;
		c.gridy 		= 1;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,15,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_A1, c);
		add(label_A1);		
		
		// A1 component
		text_LabelsOn = "Person labels on";
		text_LabelsOff = "Person labels off";		
		if (SimulationUserPanel.isPersonLabels() == true) text_Labels = text_LabelsOn;
		else text_Labels = text_LabelsOff;

		component_A1  = new JButton(text_Labels);
		component_A1.setToolTipText("Press the button to toggle on/off the identification labels for Person agents on the display.");
		c.gridx 		= 1;
		c.gridy 		= 1;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,15,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_A1, c);
		component_A1.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				if(component_A1.getText().equals(text_LabelsOff))
				{
					component_A1.setText(text_LabelsOn);
					SimulationUserPanel.setPersonLabels(true);
				}
				else
				{
					component_A1.setText(text_LabelsOff);
					SimulationUserPanel.setPersonLabels(false);
				}
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			    System.out.println("Person A1. personLabels:  " +
//			    		 SimulationUserPanel.isPersonLabels());
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_A1);
				
		// B1 label
		JLabel label_B1 = new JLabel("B1. Number of Person agents:");
		label_B1.setToolTipText("Set the number of Person agents at the start of the simulation.");
		c.gridx 		= 0;
		c.gridy 		= 2;
		c.gridwidth 	= 1;
		c.gridheight 	= 2;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_B1, c);
		add(label_B1);			
		
		// B1 component
		component_B1 = new JSlider(0, 1000, SimulationUserPanel.getNumberOfPersonAgents());
		component_B1.setMajorTickSpacing(200);
		component_B1.setMinorTickSpacing(100);		
		component_B1.setLabelTable(component_B1.createStandardLabels(200));
		component_B1.setPaintTicks(true);
		component_B1.setPaintLabels(true);
		component_B1.setToolTipText("Set the number of Person agents at the start of the simulation.");
		c.gridx 		= 1;
		c.gridy 		= 3;
		c.gridwidth 	= 2;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.NORTHWEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_B1, c);
		component_B1.addChangeListener(new ChangeListener()
		{
			public void stateChanged(ChangeEvent event)
			{
				if (component_B1.getValueIsAdjusting()) return;
				else
				{
					label_B1a.setText("Value:  " + component_B1.getValue());
					SimulationUserPanel.setNumberOfPersonAgents(component_B1.getValue());
					
					//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
					//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//				    System.out.println("Person B1. numberOfPersonAgents:  " +
//				    		 SimulationUserPanel.getNumberOfPersonAgents());
				    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  				    
				    
				}
			}//end stateChanged()
		}
		);
		add(component_B1);

		// B1a label
		label_B1a = new JLabel("Value:  " + component_B1.getValue());
		c.gridx 		= 1;
		c.gridy 		= 2;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.SOUTHWEST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,10,0,0);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_B1a, c);
		add(label_B1a);	
	
		// C1 label
		JLabel label_C1 = new JLabel("C1. Geographic location distribution type:");
		label_C1.setToolTipText("Set how the location of Person agents is distributed in the community.");
		c.gridx 		= 0;
		c.gridy 		= 4;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(15,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_C1, c);
		add(label_C1);		
		
		// C1 component
		String[] geographicDistributionTypes = {Constants.UNIFORM_DISTRIBUTION, Constants.NORMAL_DISTRIBUTION};	
		component_C1 = new JComboBox(geographicDistributionTypes);
		if(SimulationUserPanel.getGeographicLocationDistributionType() == Constants.UNIFORM_DISTRIBUTION)
		component_C1.setSelectedIndex(0);
		else component_C1.setSelectedIndex(1);
		component_C1.setToolTipText("Set how the location of Person agents is distributed in the community.");
		c.gridx 		= 1;
		c.gridy 		= 4;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(15,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_C1, c);
		component_C1.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setGeographicLocationDistributionType(
						(String)component_C1.getSelectedItem());
	
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person C1. geographicLocationDistributionType:  " +
//			    		 SimulationUserPanel.getGeographicLocationDistributionType()); //Person: C1
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_C1);		
		
		// C2 label
		JLabel label_C2 = new JLabel("C2. Normal distribution mean:");
		label_C2.setToolTipText("If 'Random normal distribution' is selected for parameter C1," +
				" this parameter gives the distribution's mean.");
		c.gridx 		= 0;
		c.gridy 		= 5;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_C2, c);
		add(label_C2);		
			
		// C2 component
		component_C2 = new JTextField(Double.toString(SimulationUserPanel.getGeographicLocationNormalDistributionMean()), 10);
		component_C2.setToolTipText("If 'Random normal distribution' is selected for parameter C1," +
				" this parameter gives the distribution's mean.");
		c.gridx 		= 1;
		c.gridy 		= 5;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_C2, c);
		component_C2.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setGeographicLocationNormalDistributionMean(
						Double.valueOf(component_C2.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person C2. geographicLocationNormalDistributionMean:  " +
//			    		 SimulationUserPanel.getGeographicLocationNormalDistributionMean()); //Person: C2
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_C2);		

		// C3 label
		JLabel label_C3 = new JLabel("C3. Normal distribution standard deviation:");
		label_C3.setToolTipText("If 'Random normal distribution' is selected for parameter C1," +
				" this parameter gives the distribution's standard deviation.");
		c.gridx 		= 0;
		c.gridy 		= 6;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_C3, c);
		add(label_C3);		
			
		// C3 component
		component_C3 = new JTextField(Double.toString(SimulationUserPanel.getGeographicLocationNormalDistributionSD()), 10);
		component_C3.setToolTipText("If 'Random normal distribution' is selected for parameter C1," +
				" this parameter gives the distribution's standard deviation.");
		c.gridx 		= 1;
		c.gridy 		= 6;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_C3, c);
		component_C3.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setGeographicLocationNormalDistributionSD(
						Double.valueOf(component_C3.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person C3. geographicLocationNormalDistributionSD:  " +
//			    		 SimulationUserPanel.getGeographicLocationNormalDistributionSD()); //Person: C3
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_C3);			
	
		// C4 label
		JLabel label_C4 = new JLabel("C4. Neighborhood radius:");
		label_C4.setToolTipText("Set the radius to determine the Person agents in a Person's neighborhood.");
		c.gridx 		= 0;
		c.gridy 		= 7;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_C4, c);
		add(label_C4);		
			
		// C4 component
		component_C4 = new JTextField(Double.toString(SimulationUserPanel.getNeighborhoodRadius()), 10);
		component_C4.setToolTipText("Set the radius to determine the Person agents in a Person's neighborhood.");
		c.gridx 		= 1;
		c.gridy 		= 7;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_C4, c);
		component_C4.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setNeighborhoodRadius(
						Double.valueOf(component_C4.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person C4. neighborhoodRadius:  " +
//			    		 SimulationUserPanel.getNeighborhoodRadius()); //Person: C4
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_C4);			
		
		// D1 label
		JLabel label_D1 = new JLabel("D1. Maximum income:");
		label_D1.setToolTipText("For Person agents, set the maximum income for a period.");
		c.gridx 		= 0;
		c.gridy 		= 8;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(15,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_D1, c);
		add(label_D1);		
			
		// D1 component
		component_D1 = new JTextField(Double.toString(SimulationUserPanel.getMaximumIncome()), 10);
		component_D1.setToolTipText("For Person agents, set the maximum income for a period.");
		c.gridx 		= 1;
		c.gridy 		= 8;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(15,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_D1, c);
		component_D1.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setMaximumIncome(
						Double.valueOf(component_D1.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person D1. maximumIncome:  " +
//			    		 SimulationUserPanel.getMaximumIncome()); //Person: D1
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_D1);			
				
		// D2 label
		JLabel label_D2 = new JLabel("D2. Income distribution type:");
		label_D2.setToolTipText("Set how the income of Person agents is distributed.");
		c.gridx 		= 0;
		c.gridy 		= 9;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_D2, c);
		add(label_D2);		
		
		// D2 component
		String[] incomeDistributionTypes = {Constants.UNIFORM_DISTRIBUTION, Constants.LOG_NORMAL_DISTRIBUTION};	
		component_D2 = new JComboBox(incomeDistributionTypes);
		if (SimulationUserPanel.getIncomeDistributionType() == Constants.UNIFORM_DISTRIBUTION)
			component_D2.setSelectedIndex(0);
		else component_D2.setSelectedIndex(1);
		component_D2.setToolTipText("Set how the income of Person agents is distributed.");
		c.gridx 		= 1;
		c.gridy 		= 9;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_D2, c);
		component_D2.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setIncomeDistributionType(
						(String)component_D2.getSelectedItem());

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person D2. incomeDistributionType:  " +
//			    		 SimulationUserPanel.getIncomeDistributionType()); //Person: D2
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_D2);		
		
		// D3 label
		JLabel label_D3 = new JLabel("D3. Log normal distribution mean:");
		label_D3.setToolTipText("If 'Random log normal distribution' is selected for parameter D2," +
				" this parameter gives the distribution's mean.");
		c.gridx 		= 0;
		c.gridy 		= 10;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_D3, c);
		add(label_D3);		
			
		// D3 component
		component_D3 = new JTextField(Double.toString(SimulationUserPanel.getIncomeLogNormalDistributionMean()), 10);
		component_D3.setToolTipText("If 'Random log normal distribution' is selected for parameter D2," +
				" this parameter gives the distribution's mean.");
		c.gridx 		= 1;
		c.gridy 		= 10;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_D3, c);
		component_D3.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setIncomeLogNormalDistributionMean(
						Double.valueOf(component_D3.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person D3. incomeLogNormalDistributionMean:  " +
//			    		 SimulationUserPanel.getIncomeLogNormalDistributionMean()); //Person: D3
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_D3);		

		// D4 label
		JLabel label_D4 = new JLabel("D4. Log normal distribution standard deviation:");
		label_D4.setToolTipText("If 'Random log normal distribution' is selected for parameter D2," +
				" this parameter gives the distribution's standard deviation.");
		c.gridx 		= 0;
		c.gridy 		= 11;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_D4, c);
		add(label_D4);		
			
		// D4 component
		component_D4 = new JTextField(Double.toString(SimulationUserPanel.getIncomeLogNormalDistributionSD()), 10);
		component_D4.setToolTipText("If 'Random log normal distribution' is selected for parameter D2," +
				" this parameter gives the distribution's standard deviation.");
		c.gridx 		= 1;
		c.gridy 		= 11;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_D4, c);
		component_D4.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setIncomeLogNormalDistributionSD(
						Double.valueOf(component_D4.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person D4. incomeLogNormalDistributionSD:  " +
//			    		 SimulationUserPanel.getIncomeLogNormalDistributionSD()); //Person: D4
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_D4);			
	
		// E1 label
		JLabel label_E1 = new JLabel("E1. Initial disease status distribution type:");
		label_E1.setToolTipText("Set how the initial disease status of Person agents is distributed.");
		c.gridx 		= 0;
		c.gridy 		= 12;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(15,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_E1, c);
		add(label_E1);		
		
		// E1 component
		String[] initialDiseaseDistributionTypes = {Constants.UNIFORM_DISTRIBUTION, Constants.LOG_NORMAL_DISTRIBUTION};	
		component_E1 = new JComboBox(initialDiseaseDistributionTypes);
		if (SimulationUserPanel.getInitialDiseaseDistributionType() == Constants.UNIFORM_DISTRIBUTION)
			component_E1.setSelectedIndex(0);
		else component_E1.setSelectedIndex(1);
		component_E1.setToolTipText("Set how the initial disease status of Person agents is distributed.");
		c.gridx 		= 1;
		c.gridy 		= 12;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(15,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_E1, c);
		component_E1.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setInitialDiseaseDistributionType(
						(String)component_E1.getSelectedItem());

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person E1. initialDiseaseDistributionType:  " +
//			    		 SimulationUserPanel.getInitialDiseaseDistributionType()); //Person: E1
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_E1);		
		
		// E2 label
		JLabel label_E2 = new JLabel("E2. Log normal distribution mean:");
		label_E2.setToolTipText("<html>If \'Random log normal distribution\' is selected for parameter E1," +
				" this parameter gives the distribution's mean.<br>" +
				"The mean should be less than 10.0.</html>");
		c.gridx 		= 0;
		c.gridy 		= 13;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_E2, c);
		add(label_E2);		
			
		// E2 component
		component_E2 = new JTextField(Double.toString(SimulationUserPanel.getInitialDiseaseLogNormalDistributionMean()), 10);
		component_E2.setToolTipText("<html>If \'Random log normal distribution\' is selected for parameter E1," +
				" this parameter gives the distribution's mean.<br>" +
				"The mean should be less than 10.0.</html>");
		c.gridx 		= 1;
		c.gridy 		= 13;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_E2, c);
		component_E2.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setInitialDiseaseLogNormalDistributionMean(
						Double.valueOf(component_E2.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person E2. initialDiseaseLogNormalDistributionMean:  " +
//			    		 SimulationUserPanel.getInitialDiseaseLogNormalDistributionMean()); //Person: E2
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_E2);		

		// E3 label
		JLabel label_E3 = new JLabel("E3. Log normal distribution standard deviation:");
		label_E3.setToolTipText("If 'Random log normal distribution' is selected for parameter E1," +
				" this parameter gives the distribution's standard deviation.");
		c.gridx 		= 0;
		c.gridy 		= 14;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_E3, c);
		add(label_E3);		
			
		// E3 component
		component_E3 = new JTextField(Double.toString(SimulationUserPanel.getInitialDiseaseLogNormalDistributionSD()), 10);
		component_E3.setToolTipText("If 'Random log normal distribution' is selected for parameter E1," +
				" this parameter gives the distribution's standard deviation.");
		c.gridx 		= 1;
		c.gridy 		= 14;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_E3, c);
		component_E3.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setInitialDiseaseLogNormalDistributionSD(
						Double.valueOf(component_E3.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person E3. initialDiseaseLogNormalDistributionSD:  " +
//			    		 SimulationUserPanel.getInitialDiseaseLogNormalDistributionSD()); //Person: E3
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_E3);			
			
		// F1 label
		JLabel label_F1 = new JLabel("F1. Disease status random increment maximum:");
		label_F1.setToolTipText("For Person agents, set the maximum random increment for disease status in a period.");
		c.gridx 		= 0;
		c.gridy 		= 15;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(15,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_F1, c);
		add(label_F1);		
			
		// F1 component
		component_F1 = new JTextField(Double.toString(SimulationUserPanel.getIncrementalDiseaseMaximum()), 10);
		component_F1.setToolTipText("For Person agents, set the maximum random increment for disease status in a period.");
		c.gridx 		= 1;
		c.gridy 		= 15;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(15,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_F1, c);
		component_F1.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setIncrementalDiseaseMaximum(
						Double.valueOf(component_F1.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person F1. incrementalDiseaseMaximum:  " +
//			    		 SimulationUserPanel.getIncrementalDiseaseMaximum()); //Person: F1
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_F1);			
				
		// F2 label
		JLabel label_F2 = new JLabel("F2. Disease status increment distribution type:");
		label_F2.setToolTipText("Set how the disease increment of Person agents is distributed.");
		c.gridx 		= 0;
		c.gridy 		= 16;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_F2, c);
		add(label_F2);		
		
		// F2 component
		String[] diseaseIncrementDistributionTypes = {Constants.UNIFORM_DISTRIBUTION, Constants.LOG_NORMAL_DISTRIBUTION};	
		component_F2 = new JComboBox(diseaseIncrementDistributionTypes);
		if (SimulationUserPanel.getIncrementalDiseaseDistributionType() == Constants.UNIFORM_DISTRIBUTION)
			component_F2.setSelectedIndex(0);
		else component_F2.setSelectedIndex(1);
		component_F2.setToolTipText("Set how the disease increment of Person agents is distributed.");
		c.gridx 		= 1;
		c.gridy 		= 16;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_F2, c);
		component_F2.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setIncrementalDiseaseDistributionType(
						(String)component_F2.getSelectedItem());

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person F2. incrementalDiseaseDistributionType:  " +
//			    		 SimulationUserPanel.getIncrementalDiseaseDistributionType()); //Person: F2
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_F2);		
		
		// F3 label
		JLabel label_F3 = new JLabel("F3. Log normal distribution mean:");
		label_F3.setToolTipText("If 'Random log normal distribution' is selected for parameter F2," +
				" this parameter gives the distribution's mean.");
		c.gridx 		= 0;
		c.gridy 		= 17;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_F3, c);
		add(label_F3);		
			
		// F3 component
		component_F3 = new JTextField(Double.toString(SimulationUserPanel.getIncrementalDiseaseLogNormalDistributionMean()), 10);
		component_F3.setToolTipText("If 'Random log normal distribution' is selected for parameter F2," +
				" this parameter gives the distribution's mean.");
		c.gridx 		= 1;
		c.gridy 		= 17;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_F3, c);
		component_F3.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setIncrementalDiseaseLogNormalDistributionMean(
						Double.valueOf(component_F3.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person F3. incrementalDiseaseLogNormalDistributionMean:  " +
//			    		 SimulationUserPanel.getIncrementalDiseaseLogNormalDistributionMean()); //Person: F3
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_F3);		

		// F4 label
		JLabel label_F4 = new JLabel("F4. Log normal distribution standard deviation:");
		label_F4.setToolTipText("If 'Random log normal distribution' is selected for parameter F2," +
				" this parameter gives the distribution's standard deviation.");
		c.gridx 		= 0;
		c.gridy 		= 18;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_F4, c);
		add(label_F4);		
			
		// F4 component
		component_F4 = new JTextField(Double.toString(SimulationUserPanel.getIncrementalDiseaseLogNormalDistributionSD()), 10);
		component_F4.setToolTipText("If 'Random log normal distribution' is selected for parameter F2," +
				" this parameter gives the distribution's standard deviation.");
		c.gridx 		= 1;
		c.gridy 		= 18;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_F4, c);
		component_F4.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setIncrementalDiseaseLogNormalDistributionSD(
						Double.valueOf(component_F4.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person F4. incrementalDiseaseLogNormalDistributionSD:  " +
//			    		 SimulationUserPanel.getIncrementalDiseaseLogNormalDistributionSD()); //Person: F4
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_F4);		

		// G1 label
		JLabel label_G1 = new JLabel("G1. Health improvement percentage:");
		label_G1.setToolTipText("Set the percentage a Person's disease status decreases when treated.");
		c.gridx 		= 0;
		c.gridy 		= 19;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(15,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_G1, c);
		add(label_G1);		
			
		// G1 component
		component_G1 = new JTextField(Double.toString(SimulationUserPanel.getHealthImprovementPercentage()), 10);
		component_G1.setToolTipText("Set the percentage a Person's disease status decreases when treated.");
		c.gridx 		= 1;
		c.gridy 		= 19;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(15,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_G1, c);
		component_G1.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setHealthImprovementPercentage(
						Double.valueOf(component_G1.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person G1. healthImprovementPercentage:  " +
//			    		 SimulationUserPanel.getHealthImprovementPercentage()); //Person: G1
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_G1);	

		// G2 label
		JLabel label_G2 = new JLabel("G2. Health deterioration percentage:");
		label_G2.setToolTipText("Set the percentage a Person's disease status increases when not treated.");
		c.gridx 		= 0;
		c.gridy 		= 20;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_G2, c);
		add(label_G2);		
			
		// G2 component
		component_G2 = new JTextField(Double.toString(SimulationUserPanel.getHealthDeteriorationPercentage()), 10);
		component_G2.setToolTipText("Set the percentage a Person's disease status increases when not treated.");
		c.gridx 		= 1;
		c.gridy 		= 20;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_G2, c);
		component_G2.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setHealthDeteriorationPercentage(
						Double.valueOf(component_G2.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person G2. healthDeteriorationPercentage:  " +
//			    		 SimulationUserPanel.getHealthDeteriorationPercentage()); //Person: G2
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_G2);	

		// H1 label
		JLabel label_H1 = new JLabel("H1. Decision inertia percentage:");
		label_H1.setToolTipText("Set the percentage of Person agents who will make the same health insurance purchase as before.");
		c.gridx 		= 0;
		c.gridy 		= 21;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(15,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_H1, c);
		add(label_H1);		
			
		// H1 component
		component_H1 = new JTextField(Double.toString(SimulationUserPanel.getDecisionInertiaPercentage()), 10);
		component_H1.setToolTipText("Set the percentage of Person agents who will make the same health insurance purchase as before.");
		c.gridx 		= 1;
		c.gridy 		= 21;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(15,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_H1, c);
		component_H1.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setDecisionInertiaPercentage(
						Double.valueOf(component_H1.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person H1. decisionInertiaPercentage:  " +
//			    		 SimulationUserPanel.getDecisionInertiaPercentage()); //Person: H1
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_H1);	

		// H2 label
		JLabel label_H2 = new JLabel("H2. Health gravity threshold:");
		label_H2.setToolTipText("<html>Set the threshold beyond which a Person views his or her disease status as grave.<br>" +
				"It can be any number between 0.0 and 10.0.</html>");
		c.gridx 		= 0;
		c.gridy 		= 22;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_H2, c);
		add(label_H2);		
			
		// H2 component
		component_H2 = new JTextField(Double.toString(SimulationUserPanel.getHealthGravityThreshold()), 10);
		component_H2.setToolTipText("<html>Set the threshold beyond which a Person views his or her disease status as grave.<br>" +
				"It can be any number between 0.0 and 10.0.</html>");
		c.gridx 		= 1;
		c.gridy 		= 22;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_H2, c);
		component_H2.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setHealthGravityThreshold(
						Double.valueOf(component_H2.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person H2. healthGravityThreshold:  " +
//			    		 SimulationUserPanel.getHealthGravityThreshold()); //Person: H2
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_H2);	

		// H3 label
		JLabel label_H3 = new JLabel("H3. Advertising impact threshold:");
		label_H3.setToolTipText("<html>Set the threshold beyond which Exchange advertising can affect a Person's health insurance purchasing behavior.<br>" +
				"It can be any number between 0.0 and 10.0.</html>");
		c.gridx 		= 0;
		c.gridy 		= 23;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.EAST;
		c.fill 			= GridBagConstraints.NONE;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(label_H3, c);
		add(label_H3);		
			
		// H3 component
		component_H3 = new JTextField(Double.toString(SimulationUserPanel.getAdvertisingImpactThreshold()), 10);
		component_H3.setToolTipText("<html>Set the threshold beyond which Exchange advertising can affect a Person's health insurance purchasing behavior.<br>" +
				"It can be any number between 0.0 and 10.0.</html>");
		c.gridx 		= 1;
		c.gridy 		= 23;
		c.gridwidth 	= 1;
		c.gridheight 	= 1;
		c.weightx 		= 1.0;
		c.weighty 		= 1.0;
		c.anchor 		= GridBagConstraints.WEST;
		c.fill 			= GridBagConstraints.HORIZONTAL;
		c.insets 		= new Insets(0,0,0,10);
		c.ipadx			= 0;
		c.ipady			= 0;
		gridBagLayout.setConstraints(component_H3, c);
		component_H3.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				SimulationUserPanel.setAdvertisingImpactThreshold(
						Double.valueOf(component_H3.getText()));

				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  					
//			     System.out.println("Person H3. advertisingImpactThreshold:  " +
//			    		 SimulationUserPanel.getAdvertisingImpactThreshold()); //Person: H3
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  	
			}//end actionPerformed()
		}
		);
		add(component_H3);	
		
	}//end UserPanelTab_Person()
	
}//end UserPanelTab_Person class
