public void actionPerformed(ActionEvent e) {
		
		Object o = e.getSource();
		
		Debug.print("Action performed on: " + o);
		if(o == okButton) {
			// update everything in the fermDB
			db.fermDB = pantryFermTableModel.data;			
			db.writeFermentables();
			
			db.hopsDB = pantryHopsTableModel.data;
			db.writeHops();
			
			setVisible(false);
			dispose();
			
		} else if(o == cancelButton) {
			dispose();
		} else if (o == btnAddMalt) {
			Fermentable f = new Fermentable();
			pantryFermTableModel.addRow(f);
			pantryFermTable.updateUI();
		} else if (o == maltUnitsComboBox) {
			String u = (String) cmbMaltUnitsModel.getSelectedItem();
			int i = pantryFermTable.getSelectedRow();
			pantryFermTableModel.data.get(i).setUnits(u);
			pantryFermTableModel.data.get(i).convertTo(u);
		} else if (o == hopsUnitsComboBox) {
			String u = (String) cmbHopsUnitsModel.getSelectedItem();
			int i = pantryHopsTable.getSelectedRow();
			pantryHopsTableModel.data.get(i).setUnits(u);
			pantryHopsTableModel.data.get(i).convertTo(u);
		} 
	}