private void btnEvaluateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEvaluateActionPerformed
    if(this.currentTree.getCurrentRegExp()!= null && this.currentTree.getCurrentRegExp().equals(txtRegularExpression.getText())){
        if(this.chkboxRevert.isSelected() != this.currentTree.isInverted()){
            JOptionPane.showMessageDialog(this, "The Current Regular Expression isInverted: [" + this.currentTree.isInverted() + "], you have to reload.", "Can't evaluate", JOptionPane.WARNING_MESSAGE);
            this.btnLoadRegExp.requestFocus();
            return;
        }
        
        String expression = this.txtChain.getText();
        boolean isValid = false;
        try {
            isValid = manager.validateExpression(expression);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    
        if(isValid)
            JOptionPane.showMessageDialog(this, "The expression: [" + expression + "] is valid.", 
                    "Valid expression", JOptionPane.INFORMATION_MESSAGE);
        else
            JOptionPane.showMessageDialog(this, "The expression: [" + expression + "] is invalid.\nDetail: " + manager.getErrorMessage(), 
                    "Invalid expression", JOptionPane.ERROR_MESSAGE);
        this.txtChain.requestFocus();
    }else{
        JOptionPane.showMessageDialog(this, "The Current Regular Expression hasn't been loaded yet.", "Can't evaluate", JOptionPane.WARNING_MESSAGE);
        this.btnLoadRegExp.requestFocus();
    }
}//GEN-LAST:event_btnEvaluateActionPerformed