private void createActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_createActionPerformed
        try{
	    if (nameOutlet.getText().isEmpty()
		    || codeOutlet.getText().isEmpty()
		    || priceAOutlet.getText().isEmpty()
		    || priceBOutlet.getText().isEmpty()) {
		JOptionPane.showMessageDialog(null, tools.Utilities.incompleteFormMessage, "Fout!", JOptionPane.WARNING_MESSAGE);
		return;
	    }
	    
	    if (!database.Database.driver().isArticleCodeUnique(codeOutlet.getText())) {
		JOptionPane.showMessageDialog(null, "Deze artikelcode is niet uniek!", "Fout!", JOptionPane.WARNING_MESSAGE);
		return;
	    }
	    
	    /*
	     * Set values on the model
	     */
	    model.setName(nameOutlet.getText());
	    model.setCode(codeOutlet.getText());
	    model.setPriceA(Double.parseDouble(priceAOutlet.getText()));
	    model.setPriceB(Double.parseDouble(priceBOutlet.getText()));
	    model.setUnit(unitOutlet.getText());
	    model.setTaxes(Double.parseDouble(taxesOutlet.getText()));
	    
	    // set comments
	    
	    FunctionResult<Article> res = model.create();
	    if (res.getCode() == 0 && res.getObj() != null) {
		delegate.addArticle(res.getObj());
		disposeLater();
	    } else {
		// switch case error code
		JOptionPane.showMessageDialog(null, "Het toevoegen van het artikel heeft foutcode "+res.getCode()+" opgeleverd. Contacteer de ontwikkelaars met deze informatie.", "Fout!", JOptionPane.ERROR_MESSAGE);
		disposeLater();
	    }
	} catch (Exception e){
	    System.err.println("Error: \n"+e.getMessage());
	    JOptionPane.showMessageDialog(null, tools.Utilities.incorrectFormMessage, "Fout!", JOptionPane.WARNING_MESSAGE);
	}
    }//GEN-LAST:event_createActionPerformed