@Override
	public void actionPerformed(ActionEvent e) {
		switch(e.getActionCommand()){
		case "return":
			CardLayout layout = (CardLayout) this.getParent().getLayout();
			layout.show(this.getParent(), "MANAGE_ITEMS");
			break;
		case "edit":
			//Set dailyFee and maxFee to zero if the textfields for them are empty
			float dailyFee, maxFee;
			if(dailyLateFeeField.getText().isEmpty()){
				dailyFee=-1f;
			}else{
				dailyFee =Float.parseFloat(dailyLateFeeField.getText());
			}
			if(maxLateFeeField.getText().isEmpty()){
				maxFee=-2f;
			}else{
				maxFee = Float.parseFloat(maxLateFeeField.getText());
			}
			LibrarianActionsControl.editItem(this, oldItemInformation[0], oldItemInformation[1], nameField.getText(),(String) categoryComboBox.getSelectedItem(), dailyFee, maxFee, (int) numberOfCopiesSpinner.getValue());
			break;
		}
		
	}