public void fillDialogFields(StockItem stockItem) {
        if (stockItem != null) {
        	barCodeField.setText(stockItem.getId() + "");
            getNameField().setText(stockItem.getName());
            String priceString = String.valueOf(stockItem.getPrice());
            priceField.setText(priceString);
        } else {
            reset();
        }
    }