@Override
	public void actionPerformed(ActionEvent e) {
		JComponent source = (JComponent) (e.getSource());
		
		if (source == (JComponent) interpolationmodeBox) {
			plotComponent.setInterpolationMethod(interpolationmodeBox.getSelectedIndex());
		}
		else if(source == (JComponent) functionsBox) {
			plotComponent.setFunction(functionsBox.getSelectedIndex());
		}
		else if(source == (JComponent) aField || source == (JComponent) bField || source == (JComponent) nField) {
			plotComponent.setSamplingPoints(Integer.parseInt(aField.getText()), Integer.parseInt(bField.getText()), Integer.parseInt(nField.getText()));
		}
	}