@Override
	public void actionPerformed(ActionEvent event) {
		Object source = event.getSource();
		if (source.equals(btnOpen)) {
			JFileChooser jfc = new JFileChooser();
			jfc.setMultiSelectionEnabled(false);
			jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
			int option = jfc.showOpenDialog(this);
			if (option == JFileChooser.APPROVE_OPTION) {
				String path = jfc.getSelectedFile().getAbsolutePath();
				txfFolderPath.setText(path);
				configProperties.put(FOLDER_PATH_INI, path);
				saveConfig();
			}
		} else if (source.equals(btnParse)) {
			File folder = new File(txfFolderPath.getText());
			if (!folder.exists()) {
				JOptionPane.showMessageDialog(this, folder.getAbsolutePath()+" does not exist!", "Folder does not exist", JOptionPane.ERROR_MESSAGE);
				return;
			}
			if (!folder.isDirectory()) {
				JOptionPane.showMessageDialog(this, folder.getAbsolutePath()+" is not a folder!", "Not a folder", JOptionPane.ERROR_MESSAGE);
				return;
			}
			File[] files = folder.listFiles();
			parsedData = MailParser.parse(files);
			Arrays.sort(parsedData, SpeedCheckData.COMPARATOR);
			speedCheckTableModel.setData(parsedData);
		} else if (source.equals(btnVisualize)) {
			TimeSeriesCollection tsc = new TimeSeriesCollection();
			TimeSeries ts = new TimeSeries("");
			SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy");
			int previousDay = 0;
			Calendar calendar = Calendar.getInstance();
			for (SpeedCheckData scd : parsedData) {
				Date date = scd.getDate();
				double value = scd.getDownSpeed();
				calendar.setTime(date);
				int day = calendar.get(Calendar.DAY_OF_MONTH);
				if (day != previousDay) {
					previousDay = day;
					ts = new TimeSeries(sdf.format(date));
					tsc.addSeries(ts);
				}
				ts.add(new Minute(calendar.get(Calendar.MINUTE), calendar.get(Calendar.HOUR_OF_DAY), 1, 1, 2000), value);
			}
			JFreeChart timeSeriesChart = ChartFactory.createTimeSeriesChart("Graph", "Date", "Speed", tsc, true, true, false);
			XYPlot plot = (XYPlot) timeSeriesChart.getPlot();
			DateAxis dateAxis = (DateAxis) plot.getDomainAxis();
			SimpleDateFormat sdfAxis = new SimpleDateFormat("HH:mm");
			dateAxis.setDateFormatOverride(sdfAxis);
			dateAxis.setVerticalTickLabels(true);
			ChartFrame cf = new ChartFrame("Chart", timeSeriesChart);
			cf.setMinimumSize(new Dimension(600, 400));
			cf.setLocationRelativeTo(this);
			cf.setVisible(true);
		}
	}