public void actionPerformed(ActionEvent e) {

		JComponent source = (JComponent) (e.getSource());

		/* Oeffnen eines neuen Bildes */
		if (source == (JComponent) openitem) {
			JFileChooser d = new JFileChooser();
			d.setCurrentDirectory(new File("./"));

			d.setFileFilter(new PictureFilter());
			int returnVal = d.showOpenDialog(null);

			if (returnVal == JFileChooser.APPROVE_OPTION) {
				File file = d.getSelectedFile();
				viewComponent.setImage(file);
				System.out.println("Opening: " + file.getName() + ".\n");
			} else {
				System.out.println("Open command cancelled by user.\n");
			}
		}
		/* Speichern des Bildes */
		else if (source == (JComponent) saveitem) {
			JFileChooser d = new JFileChooser();
			d.setCurrentDirectory(new File("./"));

			d.setFileFilter(new PictureFilter());
			int returnVal = d.showSaveDialog(null);

			if (returnVal == JFileChooser.APPROVE_OPTION) {
				File file = d.getSelectedFile(); 
				viewComponent.saveImage(file);
				System.out.println("Saving: " + file.getName() + ".\n");
			} else {
				System.out.println("Open command cancelled by user.\n");
			}

			/* Rueckgaengig machen der letzten Aktion */
		} else if (source == (JComponent) undoitem) {
			viewComponent.undo();

			/* Das Bild skalieren */
		} else if (source == (JComponent) scaleButton
				|| source == (JComponent) scaleFactorField) {
			int mode = interpolationmodeBox.getSelectedIndex();
			try {
				double scalefactor = Double.parseDouble(scaleFactorField
						.getText());
				if (scalefactor >= 0)
					viewComponent.scaleImage(scalefactor, mode);
				else
					System.out.println("Bitte positive Zahl eingeben!");
			} catch (NumberFormatException exept) {
				System.out.println("Bitte eine Zahl eingeben!");
			}
		}

	}