private boolean validateFields()
	{
		if (txtFirstName.getText().trim().isEmpty() )
		{
			JOptionPane.showMessageDialog(this, "Enter first name");
			txtFirstName.requestFocus();
			return false;
		}
		else if(txtLastName.getText().trim().isEmpty())
		{
			JOptionPane.showMessageDialog(this, "Enter last name");
			txtLastName.requestFocus();
			return false;
			
		}
		else if(txtPhone.getText().trim().isEmpty())
		{
			JOptionPane.showMessageDialog(this, "Enter phone number");
			txtPhone.requestFocus();
			return false;
		}
		else 
		{
			Pattern patternPhone = Pattern.compile("\\d{3}-\\d{3}-\\d{4}");
		    Matcher matcherPhone = patternPhone.matcher(txtPhone.getText().trim());
			 
			Pattern patternPhone2 = Pattern.compile("\\(\\d{3}\\) \\d{3}-\\d{4}");
		    Matcher matcherPhone2 = patternPhone2.matcher(txtPhone.getText().trim());
			 
		    if ((!matcherPhone.matches()) && (!matcherPhone2.matches())) 
		    {
		    	  JOptionPane.showMessageDialog(this, "Enter valid phone number");
		    	  txtPhone.requestFocus();
		    	  return false;
		    }					
			else if (txtEmail.getText().trim().isEmpty())
			{
				JOptionPane.showMessageDialog(this, "Enter email id");
				txtEmail.requestFocus();
				return false;
			}
			else
			{
				Pattern patternEmail = java.util.regex.Pattern.compile(".+@travelexperts.com");
			    Matcher matcherEmail = patternEmail.matcher(txtEmail.getText().trim());
			 
			      if(!matcherEmail.matches())
			      {
			    	  JOptionPane.showMessageDialog(this, "Enter valid email id");
			    	  txtEmail.requestFocus();
			    	  return false;
			      }
			      else if(txtPosition.getText().trim().isEmpty())
			      {
			    	  JOptionPane.showMessageDialog(this, "Enter position");
						txtPosition.requestFocus();
						return false;
			      }
			      else
			      {
			    	  return true;
			      }
			}
		      
		}		
		
	}