protected final void CreateAddWindow() {
		try {
			log.debug("Add new stick item:\n" + model.getWarehouseTableModel());

			Object[] options = { "Add item", "Cancel" };

			intFormat = NumberFormat.getIntegerInstance();
			numFormat = NumberFormat.getNumberInstance();

			nameField = new JTextField();
			idField = new JFormattedTextField(intFormat);
			descField = new JTextField();
			quantityField = new JFormattedTextField(intFormat);
			priceField = new JFormattedTextField(numFormat);

			final JComponent[] inputs = new JComponent[] {
					new JLabel("Product name"), nameField,
					new JLabel("Product id"), idField,
					new JLabel("Product description"), descField,
					new JLabel("Product quantity"), quantityField,
					new JLabel("Product price"), priceField,

			};

			int n = JOptionPane.showOptionDialog(null, inputs, "Add item",
					JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE, null, // no
																				// icon
					options, options[1]);

			log.info(n);
			// 0 Accept
			if (n == 0) {

				try {

					quantity = Integer.parseInt(quantityField.getText());
					price = (double) Math.round(Double.parseDouble(priceField
							.getText()) * 100) / 100;
					id1 = Integer.parseInt(idField.getText());
					item = new StockItem(id1, nameField.getText(),
							descField.getText(), price, quantity);

					model.getWarehouseTableModel().addItem(item);
					Session session = HibernateUtil.currentSession();
					session.getTransaction().begin();

					for (StockItem x : model.getWarehouseTableModel()
							.getTableRows()) {
						if (item == x) {
							session.update(item);

						} else {
							session.save(item);

						}
					}
					model.getCurrentPurchaseTableModel().setItems(
							PurchaseItemPanel.items, item);
					session.getTransaction().commit();
					session.close();

				} catch (NullPointerException e) {

					e.getMessage();

				} catch (NumberFormatException e) {

					System.out.println(e.getCause());
				} catch (ConcurrentModificationException e) {
					e.printStackTrace();
				} catch (SessionException l) {
					l.printStackTrace();
				} catch (NonUniqueObjectException e) {
					e.printStackTrace();
				}

			} else {
				drawStockMenuPane();
			}
		} catch (NullPointerException e) {

			e.getMessage();

		} finally {

		}

	}