@Override
	public void actionPerformed(ActionEvent event) {
		if (event.getActionCommand().equals("start")) {
			if (canvas.getNonogram() != null) {
				main.startWorker(canvas.getSolution());
				startButton.setText("Stop");
				startButton.setActionCommand("stop");
			}
		} else if (event.getActionCommand().equals("stop")) {
			main.cancelWorker();
			setButton();
		} else if (event.getActionCommand().equals("load")) {
			try {
				JFileChooser chooser = new JFileChooser();
				chooser.setSelectedFile(new File("puzzles/" + "test1" + ".dat"));
				int returnVal = chooser.showOpenDialog(this);
				if (returnVal == JFileChooser.APPROVE_OPTION) {
					// System.out.println("You chose to open this file: " +
					chooser.getSelectedFile().getName();// );
				}

				setNonogram(Main.nonogramFromFile(chooser.getSelectedFile()
						.getAbsolutePath()));

				startButton.setEnabled(true);
			} catch (Exception e) {
				System.out.println(e);
				System.out.println(e.getCause());
				System.err.println("Problem in main method");
			}

		}
	}