@Override
		public void actionPerformed(ActionEvent e) {
			Object src = e.getSource();
			if (src == btnOk) {
				Object sel = lstStocks.getSelectedValue();
				if (sel != null && sel instanceof Stock) {
					stock = (Stock) sel;
					wasAccepted = true;
					Updater.getInstance().notifyObservers();
					setVisible(false);
				}
				else if (!requiresStock) {
					wasAccepted = true;
					Updater.getInstance().notifyObservers();
					setVisible(false);
				}
			}
			else if (src == btnCancel) {
				wasAccepted = false;
				setVisible(false);
			}
		}