private void jButtonAddUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAddUsuarioActionPerformed
        // TODO add your handling code here:
        if(jTextFieldCod.getText() == null || jTextFieldCod.getText().equals("")){
            jLabelErro.setErrorText(WORDS.getString("ERRO-CODIGO"));
        }else if(jTextFieldNome.getText() == null || jTextFieldNome.getText().equals("")){
            jLabelErro.setErrorText(WORDS.getString("ERRO-NOME"));
        }else if(jTextFieldCod.getText().contains("-")){
            jLabelErro.setErrorText(WORDS.getString("ERRO-POSITIVO"));
        }else{
            try {
                if(jTextFieldEditora.getText().equals(""))
                    banco.addLivro(jTextFieldCod.getText(), jTextFieldNome.getText(), null, jComboBoxEstado.getSelectedIndex() + 1);
                else
                    banco.addLivro(jTextFieldCod.getText(), jTextFieldNome.getText(), jTextFieldEditora.getText(), jComboBoxEstado.getSelectedIndex() + 1);
                jLabelErro.setSuccessText(WORDS.getString("LIVRO ")+jTextFieldNome.getText()+WORDS.getString("MSG-ADICIONADO"));
            } catch (SQLException ex) {
                jLabelErro.setErrorText(ex.getMessage());
            }
        }
    }//GEN-LAST:event_jButtonAddUsuarioActionPerformed