private boolean validateFields()
	{
		//***mandatory check
		// package name
		if (txtPkgName.getText().trim().isEmpty() )
		{
			JOptionPane.showMessageDialog(this, "Enter package name");
			txtPkgName.requestFocus();
			return false;
		}
		
		// Base Price
		if (txtBasePrice.getText().trim().replace("$", "").isEmpty())
		{
			JOptionPane.showMessageDialog(this, "Enter base price");
			txtBasePrice.requestFocus();
			return false;
		}
		
		// Agency commission
		if (txtAgcyCms.getText().trim().replace("$", "").isEmpty())
		{
			JOptionPane.showMessageDialog(this, "Enter agency commission");
			txtAgcyCms.requestFocus();
			return false;
		}
		
		// Description
		if (taDescription.getText().trim().isEmpty())
		{
			JOptionPane.showMessageDialog(this, "Enter description");
			taDescription.requestFocus();
			return false;
		}
		
		//*** Max length check
		// package name [VARCHAR2(100)]
		if (txtPkgName.getText().trim().length() > 100 )
		{
			JOptionPane.showMessageDialog(this, "Enter package name within 100 characters.");
			txtPkgName.requestFocus();
			return false;
		}
		// Base Price [NUMBER(19,4)]
		if (txtBasePrice.getText().trim().replace("$", "").length() > 20 )
		{
			JOptionPane.showMessageDialog(this, "Enter base price within 20 digits.");
			txtBasePrice.requestFocus();
			return false;
		}
		
		// Agency commission [NUMBER(19,4)]
		if (txtAgcyCms.getText().trim().replace("$", "").length() > 20 )
		{
			JOptionPane.showMessageDialog(this, "Enter agency commission within 20 digits.");
			txtAgcyCms.requestFocus();
			return false;
		}
		
		// Description [VARCHAR2(100)]
		if (taDescription.getText().trim().length() > 100 )
		{
			JOptionPane.showMessageDialog(this, "Enter description within 100 characters.");
			taDescription.requestFocus();
			return false;
		}
		
		// *** format check
		// Start Date
		if (!isValidStartDate())
		{
			JOptionPane.showMessageDialog(this, "Enter valid start date");
			txtBasePrice.requestFocus();
			return false;
		}
		
		// End Date
		if (!isValidEndDate())
		{
			JOptionPane.showMessageDialog(this, "Enter valid end date");
			txtBasePrice.requestFocus();
			return false;
		}		
		
		// Base Price [NUMBER(19,4)]
		if (!isNum(txtBasePrice.getText().trim().replace("$", "")))
		{
			JOptionPane.showMessageDialog(this, "Base price needs to be numeric.");
			txtBasePrice.requestFocus();
			return false;
		}
		
		// Agency commission [NUMBER(19,4)]
		if (!isNum(txtAgcyCms.getText().trim().replace("$", "")))
		{
			JOptionPane.showMessageDialog(this, "Agency commission needs to be numeric.");
			txtAgcyCms.requestFocus();
			return false;
		}
		
		//*** Relation check
		//Agency commission can not be greater than base price
		if(Double.parseDouble(txtAgcyCms.getText().trim().replace("$", "")) >
		   Double.parseDouble(txtBasePrice.getText().trim().replace("$", ""))) {
			JOptionPane.showMessageDialog(this, "Agency commission can not be greater than base price.");
			txtAgcyCms.requestFocus();
			return false;
		}
		
		// End date must be later than start date
		if(!checkDateOrder()) {
			JOptionPane.showMessageDialog(this, "End date must be later than start date.");
			txtAgcyCms.requestFocus();
			return false;
		}
		
		
		return true;
	}