public void setSubmit(JButton button, final AddMediaDialog dialog) {
		button.addMouseListener(new MouseAdapter() {
			public void mousePressed(MouseEvent evt) {
				@SuppressWarnings("rawtypes")
				Hashtable table = dialog.getValues();
				dialog.setVisible(false);

				album = new Album("", "", "", 0);
				movie = new Movie("", "", "", "", 0, 0);
				book = new Book("", "", 0);

				@SuppressWarnings("rawtypes")
				Enumeration e = table.keys();
				while (e.hasMoreElements()) {
					String key = (String) e.nextElement();
					System.out.println(key + " : " + table.get(key));

					switch (addType()) {
					case ALBUMSEARCH:
						dataToAlbum(key, table.get(key).toString());
						break;
					case MOVIESEARCH:
						dataToMovie(key, table.get(key).toString());
						break;
					case BOOKSEARCH:
						dataToBook(key, table.get(key).toString());
						break;
					default:
						break;
					}
				}
				executeQuery(QueryType.MEDIAADD, "");
			}
		});
	}