public void actionPerformed(ActionEvent e) {

			String unitName       = nameField.getText();			
			String unitFormat     = formatField.getText();
			String unitInfo       = infoTextArea.getText();
			String unitTagsString = tagsTextArea.getText();

			if (!(unitName.equals("") || unitFormat.equals("") ||
					unitInfo.equals("") || unitTagsString.equals(""))) {

				Tags tagsTemp = Tags.convertToTags(unitTagsString);

				Unit newUnit = new Unit(unitName);
				newUnit.setTypicalForm(unitFormat);
				newUnit.setInfo(unitInfo);

				for (int i=0; i<tagsTemp.size(); i++){
					newUnit.addTag(tagsTemp.get(i));
				}

				((UnitDatabase)GUIMain.UNITS).addUnit(newUnit);
				Saver.saveUnits(GUIMain.UNITS);

				nameField.setText("");
				formatField.setText("");
				infoTextArea.setText("");
				tagsTextArea.setText("");
			} 
			else {

				String errorMessage = "You left something blank:\n";

				if(unitName.equals(""))
					errorMessage += "-Name\n";
				if(unitFormat.equals(""))
					errorMessage += "-Format\n";
				if(unitInfo.equals(""))
					errorMessage += "-Info\n";
				if(unitTagsString.equals(""))
					errorMessage += "-Tags\n";

				JOptionPane.showMessageDialog(middlePanel,
						errorMessage,
						"Error",
						JOptionPane.WARNING_MESSAGE);
			}

		}