@Override
	public void focusLost(FocusEvent event) {
		if(event.getSource() == carbohydratePercentageTextField) {
			try {
				carbohydratePercentageSlider.setValue(Integer.valueOf(carbohydratePercentageTextField.getText()));
			} catch(NumberFormatException nfe) {
				carbohydratePercentageTextField.setText(String.valueOf(carbohydratePercentageSlider.getValue()));
			}
		} else if(event.getSource() == lipidPercentageTextField) {
			try {
				lipidPercentageSlider.setValue(Integer.valueOf(lipidPercentageTextField.getText()));
			} catch(NumberFormatException nfe) {
				lipidPercentageTextField.setText(String.valueOf(lipidPercentageSlider.getValue()));
			}
		} else if(event.getSource() == proteinPercentageTextField) {
			try {
				proteinPercentageSlider.setValue(Integer.valueOf(proteinPercentageTextField.getText()));
			} catch(NumberFormatException nfe) {
				proteinPercentageTextField.setText(String.valueOf(proteinPercentageSlider.getValue()));
			}
		}
	}