private void initMainFrameButtonActions() {
        mainFrame.getButtonGo().addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (mainFrame.getAddressField().getText().isEmpty()) {
                    mainFrame.getButtonGo().setEnabled(false);
                } else {
                    mainFrame.setTitle("");
                    mainFrame.getTreeModel().clearTree(mainFrame.getTreeNode());
                    mainFrame.getTableProductModel().clearTable();
                    String url = mainFrame.getAddressField().getText();
                    try {
                        mainModel.getParser().connect(url);
                        getHtmlTree();
                        getProducts();
                    } catch (ParseException ex) {
                        LOGGER.error("Invalid url!", ex);
                        JOptionPane.showMessageDialog(mainFrame, "Invalid url!", "Error", JOptionPane.ERROR_MESSAGE);
                    }
                }
            }
        });

        mainFrame.getButtonAddToDB().addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                for (Product product : products) {
                    try {
                        mainModel.getdBLogic().insertProduct(product);
                        mainFrame.getButtonAddToDB().setEnabled(false);
                    } catch (DBException ex) {
                        LOGGER.error(ex.getMessage(), ex);
                    }
                }
            }
        });
    }