public void actionPerformed(ActionEvent ae) {
		if( ae.getSource() == this.searchQuery || ae.getSource() == this.search ) {
			//displays results matching the query typed into the search box
			ArrayList<Item> results = this.library.searchByTag( this.searchQuery.getText() );
			
			this.currentListModel = new DefaultListModel<String>();
			for( Item i : results ) {
				this.currentListModel.addElement( i.getName() );
			}
			
			this.itemsDisplaying.setModel( this.currentListModel );
		}
		
		else if( ae.getSource() == this.cancel ) {
			//clears out all searches, restores default list model
			this.searchQuery.setText("");
			this.detailedItemDisplay.setText("");
			this.itemsDisplaying.setModel( this.defaultListModel );
			this.currentListModel = this.defaultListModel;
		}
		
		else if( ae.getSource() == this.deleteSelectedItems ) {
			int[] selected = this.itemsDisplaying.getSelectedIndices();
			
			if( selected.length == 0 ) {
				JOptionPane.showMessageDialog( this, "No items have been selected.", "No items selected.", JOptionPane.ERROR_MESSAGE );
			}
			else {
				int confirmation = JOptionPane.showConfirmDialog( this, "Are you sure you wish to delete" + selected.length + " item(s) from the library?", "Confirm deletion.", JOptionPane.YES_NO_OPTION );
				
				if( confirmation == JOptionPane.YES_OPTION ) {
					for( int i : selected ) {
						this.library.deleteItem( this.titlesToItems.get( this.currentListModel.get( i ) ) );
					}
					
					this.library.save();
					this.library.load();
					reloadLibraryEntries();
					this.itemsDisplaying.setModel( this.defaultListModel );
				}
			}
		}
	}