protected void processWindowEvent(WindowEvent e) {
    	if (e.getID() == WindowEvent.WINDOW_CLOSING) {

   	    	if( rosterDB.isDataChanged () || tripDB.isDataChanged() || riverDB.isDataChanged() ) {
   	    		if ( JOptionPane.showConfirmDialog(null,
   					"Sollen die Daten jetzt abgespeichert werden?", 
   	    			"Daten sind noch nicht abgespeichert",
   					JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION ) {
 						saveToFile(setupData.getDataFileName());
   				}
				saveBackupFile(setupData.getDataFileName());
    	    }
    	    
    		try {
				setupData.write(SETUP_FILE_NAME);
				System.out.println ("Setup information written to " + SETUP_FILE_NAME + ".");
			} catch (Exception exception) {
				System.out.println ("Could not save setup information to file " + SETUP_FILE_NAME + ".");
				exception.printStackTrace();
			}
	        dispose();
    	    System.exit(0);
    	}
    	super.processWindowEvent(e);
    }