@Override
	public void actionPerformed(ActionEvent evt) {
		
		if (MainWindow.tripDB.getCheckErrors() + MainWindow.tripDB.getCheckWarnings() > 0)
			if ( JOptionPane.showConfirmDialog(null,
    			"Die Planung enth\u00E4lt\n  " + 
    					MainWindow.tripDB.getCheckErrors() + " Fehler und\n  " +
    					MainWindow.tripDB.getCheckWarnings() + " Warnungen.\n" + 
    			"Soll der Ausdruck wirklich erfolgen?",
				"Die Planung enth\u00E4lt Fehler!", 
				JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION ) {
					return;
			}

	
		if (evt.getActionCommand().equals("PreviewTrips")) {
			
			formSheet = new ImageIcon (MainWindow.setupData.getFormFileName(), "Fahrtenzettel");
			if (formSheet.getImageLoadStatus() != MediaTracker.COMPLETE) {
		    	JOptionPane.showMessageDialog(null,
						"Die Formularvorlage "+ MainWindow.setupData.getFormFileName() +" wurde nicht gefunden.", 
		    			"Dateifehler",
						JOptionPane.OK_OPTION);
			}
			PrintPanel previewPanel = new PrintPanel (formSheet, targetDay.getTime());
			
//			PreviewFrame preview = new PreviewFrame ((Frame) SwingUtilities.getRoot(this), testLabel.getPrintable(new MessageFormat("Capitals"), new MessageFormat("{0}")), printerJob.getPageFormat(printAttributes));
			PageFormat pf = printerJob.getPageFormat(printAttributes); 
			Paper p = pf.getPaper();
			p.setImageableArea(0, 0, p.getWidth(), p.getHeight());
			pf.setPaper(p);
			new TripsPreviewFrame ((Frame) SwingUtilities.getRoot(this), previewPanel, pf, true);
			
		}

		if (evt.getActionCommand().equals("PreviewSummary")) {
			PrintPanelSummary previewPanel = new PrintPanelSummary (targetDay.getTime());
		
			PageFormat pf = printerJob.getPageFormat(printAttributes); 
			Paper p = pf.getPaper();
			p.setImageableArea(0, 0, p.getWidth(), p.getHeight());
			pf.setPaper(p);
			new TripsPreviewFrame ((Frame) SwingUtilities.getRoot(this), previewPanel, pf, false);
		}
		
	}