@Override
    public void actionPerformed(ActionEvent e) {
        try {
            conn = DriverManager.getConnection(Utils.DB_URL);
            PreparedStatement checkStat;
            checkStat = conn.prepareStatement("select name from section where name = ?");
            checkStat.setString(1, newSectionTextField.getText());
            resSet = checkStat.executeQuery();
            if (!resSet.next()) {
                if (Utils.checkEnteredTextForLetters(newSectionTextField.getText()) && newSectionTextField.getText().length()>0) {
                    PreparedStatement pst = conn.prepareStatement("insert into section (name) values (?)");
                    pst.setString(1, newSectionTextField.getText());
                    pst.execute();
                    sectionListTable.setModel(new SelectSectionTableModel());
                    statusLbl.setText("New section " + newSectionTextField.getText() + " added");
                    newSectionTextField.setText("");
                }
                else {
                    statusLbl.setText("You can use only letters");
                }
            }
            else {
                statusLbl.setText("Such section is already in DB");
            }
        } catch (SQLException e1) {
            e1.printStackTrace();
        }
        finally {
            try {
                conn.close();
            } catch (SQLException e1) {
                e1.printStackTrace();
            }
        }
    }