private void acceptQueryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acceptQueryActionPerformed
       boolean error = false;
        String errorString = "";
        Object[] what = new Object[5];
        what[0] = enableConectionquery.isSelected();
        if (!userDataQuery.getText().equalsIgnoreCase(""))
            what[1] = userDataQuery.getText();
        else {
            error = true;
            errorString += "No user specified.\n";
        }
        
        if (!passDataQuery.getText().equalsIgnoreCase(""))
            what[2] = passDataQuery.getText();
        else {
            error = true;
            errorString += "No pass specified.\n";
        }

        what[3] = conectionDataQuery.getText();
        what[4] = queryTextArea.getText();
        if (queryTextArea.getText().equalsIgnoreCase("")) {
            error = true;
            errorString += "Query sentence field is missing.\n";
        }
        if (!error) {
        Controller.controller(Controller.QUERYBD, what);
        this.dispose();
        } else {
            JOptionPane op = new JOptionPane();
            int messagetype = JOptionPane.ERROR_MESSAGE; //JOptionPane.INFORMATION_MESSAGE
            op.showMessageDialog(this, errorString, "[ERROR] Some fields are missing", messagetype);
        }
    }//GEN-LAST:event_acceptQueryActionPerformed