public void actionPerformed(ActionEvent e) {
		
		Object o = e.getSource();
		
		Debug.print("Action performed on: " + o);
		if(o == okButton) {
			
			
			// create a new Ferm object
			Hop i = new Hop();
			i.setName(txtName.getText());
			i.setAlpha(Double.parseDouble(txtAlpha.getText()));
			
			i.setCost(txtCost.getText());
			i.setStock(Double.parseDouble(txtStock.getText()));
			i.setUnits(cUnits.getSelectedItem().toString());
			i.setDescription(txtDescr.getText());
			i.setStorage(Double.parseDouble(txtStorage.getText()));
			i.setDate(txtDate.getText());
			i.setModified(bModified.isSelected());
			
			int result = 1;
			int found = db.find(i);
			
			Debug.print("Searched for Hop, returned: "+found);
			
			// check to see if we have this hop already in the db
			if(found  >= 0){
				// This already exists, do we want to overwrite?
				result = JOptionPane.showConfirmDialog((Component) null, 
							"This ingredient exists, overwrite original?","alert", JOptionPane.YES_NO_CANCEL_OPTION); 
				
				switch(result) {
					case JOptionPane.NO_OPTION:
						setVisible(false);
						dispose();
						return;
						
						
					case JOptionPane.YES_OPTION:
						db.hopsDB.remove(found);
						break;
					
					case JOptionPane.CANCEL_OPTION:
						return;
						
					default:
						break;
				}
			}
			
			
			
			db.hopsDB.add(i);
			db.writeHops();

			setVisible(false);
			dispose();
			
		} else if(o == cancelButton) {
			dispose();
		}
		
	}