@Override
    public void actionPerformed(ActionEvent e) {
        try {
            if (Utils.checkEnteredTextForLetters(motherLangTextField.getText()) &&
                    Utils.checkEnteredTextForLetters(translationTextField.getText())) {
                String motherLangWord = motherLangTextField.getText();
                String translation = translationTextField.getText();
                int card_id = EditCard.getSelectedCardId();
                if (!checkCardForUnique(motherLangWord, translation)) {
                    Connection conn;
                    conn = DriverManager.getConnection(Utils.DB_URL);
                    PreparedStatement pStat = conn.prepareStatement("UPDATE word SET motherlang_word = '"+ motherLangWord +"', " +
                            "foreignlang_word = '" + translation + "' WHERE id = "+ card_id +" ");
                    pStat.execute();
                    reloadWordsTable();
                    motherLangTextField.setText("");
                    translationTextField.setText("");
                    statusLbl.setText("Status: Success!");
                }
                else {
                    statusLbl.setText("Status: Card with such words is already exists in DB");
                }
            }
            else {
                statusLbl.setText("Status: You can type only letters!");
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }