private void btnDifRadixActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDifRadixActionPerformed
        if (!txtRadixValue.getText().isEmpty()) {
            for (char c : txtRadixValue.getText().toCharArray()) {
                if (!Character.isLetterOrDigit(c)) {
                    return;
                }
            }

            //Add number to the current cursor position.
            int oldCaret = txtExpression.getCaretPosition();
            String s;
            txtExpression.setText(txtExpression.getText().substring(0, oldCaret) + (s = "&" + spinRadix.getValue().toString() + "_" + txtRadixValue.getText()) + txtExpression.getText().substring(oldCaret));
            txtExpression.setCaretPosition(oldCaret + s.length());
            txtExpression.grabFocus();
        }
    }//GEN-LAST:event_btnDifRadixActionPerformed