private void btnPowerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPowerActionPerformed
        int oldCaret = txtExpression.getCaretPosition();
        txtExpression.setText(txtExpression.getText().substring(0, oldCaret) + "^" + txtExpression.getText().substring(oldCaret));
        txtExpression.setCaretPosition(oldCaret + 1);
        txtExpression.grabFocus();
    }//GEN-LAST:event_btnPowerActionPerformed