@Override
	public void actionPerformed(ActionEvent e) {
		switch(e.getActionCommand()){
			case "search":
				LibrarianActionsControl.searchForItems(this, new String[]{textField.getText(), (String) comboBox.getSelectedItem()});
				break;
			case "edit":
				CardLayout layout = (CardLayout) this.getParent().getLayout();
				String name = (String) table.getModel().getValueAt(table.getSelectedRow(), 0);
				String category = (String) table.getModel().getValueAt(table.getSelectedRow(), 3);
				this.getParent().add(new LibrarianEditItemPanel(name, category), "edit");
				layout.show(this.getParent(), "edit");
				clearResults();
				break;
			case "Remove":
				CardLayout layout1 = (CardLayout) this.getParent().getLayout();
				String name1 = (String) table.getModel().getValueAt(table.getSelectedRow(), 0);
				String category1 = (String) table.getModel().getValueAt(table.getSelectedRow(), 3);
				this.getParent().add(new LibrarianRemoveItemPanel(name1, category1), "remove");
				layout1.show(this.getParent(), "remove");
				clearResults();
				break;
			case "View Reservations":
				CardLayout layout11 = (CardLayout) this.getParent().getLayout();
				String name11 = (String) table.getModel().getValueAt(table.getSelectedRow(), 0);
				String category11 = (String) table.getModel().getValueAt(table.getSelectedRow(), 3);
				this.getParent().add(new LibrarianViewItemReservationListPanel(name11, category11), "View Reservations");
				layout11.show(this.getParent(), "View Reservations");
				clearResults();
				break;
			case "View Overdue Copies":
				CardLayout layout111 = (CardLayout) this.getParent().getLayout();
				String name111 = (String) table.getModel().getValueAt(table.getSelectedRow(), 0);
				String category111 = (String) table.getModel().getValueAt(table.getSelectedRow(), 3);
				this.getParent().add(new LibrarianViewOverdueCopiesPanel(name111, category111), "View Overdue");
				layout111.show(this.getParent(), "View Overdue");
				clearResults();
				break;
		}
		
	}