public AgentAddModify(AgentPanel panel, boolean bool, Agent agt) 
	{
		super();
		agentDB.connect();//call to DB connect method before GUI is loaded
		agent = agt;//set local agent to the agent passed from the parent
		addClicked = bool;
		parent = panel;
		this.setModal(true);//make dialog modal
		
		// Initialize the window.
		initGUI();

		// Update the heading text.
		lblAgentAddModify.setText("Add Agent");
		if (!addClicked)
		{
			lblAgentAddModify.setText("Modify Agent");
			populateAgent();//display agent data if modify button is clicked
		}
	}