private void loginButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loginButtonActionPerformed
        String login = loginTextField.getText();
        String password = passwordField.getText();
        if(login.equals("") || password.equals(""))
        {
            Dialogs.ErrorDialog dialog = new ErrorDialog(this, true, "Brak loginu lu hasła!", "LoginWindow", "login", "");
            dialog.setVisible(true);
            return;
        }
        boolean result = DataVector.getInstance().dbManager.login(login, password);
        if(result)
        {
            DataRow parameters = new DataRow();
            parameters.setTableName("users");
            parameters.addAttribute("name", login);
            DataRow row = DataVector.getInstance().dbManager.select(parameters).get(0);
            MainWindow wind = new MainWindow(row);
            DataVector.getInstance().setMainWindow(wind);
            wind.setVisible(true);
            this.dispose();
            
        } else {
            Dialogs.ErrorDialog dialog = new ErrorDialog(this, true, "Błąd logowania!", "LoginWindow", "login", "");
            dialog.setVisible(true);
        }
    }//GEN-LAST:event_loginButtonActionPerformed