public void actionPerformed(ActionEvent evt) {
		Object source = evt.getSource();

		if (source.equals(menuItemExport)) {
			// Menu Item "Export as CSV has been selected"
			if (controller.getState() == ApplicationState.INITIALIZED_WITH_DATA) {
				// Exportable Data is available
				System.out.println("Save as CVS");
				JFileChooser fc = new JFileChooser();
				fc.setFileSelectionMode(JFileChooser.FILES_ONLY);

				if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {
					File file = fc.getSelectedFile();
					// save to file
					controller.exportCSV(file);
				}
			} else {
				// No exportable Data is available
				JOptionPane.showMessageDialog(this, "No exportable Data.", "",
						JOptionPane.ERROR_MESSAGE);
			}

		}
		if (source.equals(connectButton)) {
			// Connect Button has been clicked

			int port = Integer.parseInt(portTextField.getText());
			String ip = ipTextField1.getText()+"."
					  + ipTextField2.getText()+"."
					  + ipTextField3.getText()+"."
					  + ipTextField4.getText();

			// call Controller to connect
			boolean result = controller.connect(ip, port);
			System.out.println("connecting...");	
			if (result) {
				// Data has been read in, updating CSV View
				JOptionPane.showMessageDialog(this, "Data has been read", "",
						JOptionPane.INFORMATION_MESSAGE);
				textArea.setText(controller.getCSVData());
				Data[] data = controller.parseCSV();
				
				for (Data d : data) {
					series_temp_p.add(d.getHours(), d.getPond_temp());
					series_temp_w.add(d.getHours(), d.getWeather_temp());
					series_light.add(d.getHours(), d.getLight());
				}
				
			} else {
				// Connection Failed for some reason
				JOptionPane.showMessageDialog(this, "Connection Failed", "",
						JOptionPane.ERROR_MESSAGE);
			}
		}
	}