private void acceptButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acceptButtonActionPerformed
        // TODO add your handling code here:
        Object[] what;
        boolean error = false;
        String msg = "";
        what = new Object[5];
        if (!tableName.getText().equalsIgnoreCase("")) what[0] = tableName.getText();
        else{
            error = true;
            msg += "There must be a table name\n";
        }
        int column = 0;
        int filas = addedTable.getRowCount();
        if (filas != 0) {
        ArrayList matches = new ArrayList();
        ArrayList names = new ArrayList();
        ArrayList types = new ArrayList();
        ArrayList optional = new ArrayList();
        for (int i = 0; i < filas; i++) {
            matches.add((String)addedTable.getValueAt(i, column));
            column = (column + 1) % 4;
            names.add((String)addedTable.getValueAt(i, column));
            column = (column + 1) % 4;
            types.add((String)addedTable.getValueAt(i, column));
            column = (column + 1) % 4;
            if (addedTable.getValueAt(i, column) == null)
                optional.add(false);
            else
                optional.add(true);
            column = (column + 1) % 4;
        }
        what[1] = matches;
        what[2] = names;
        what[3] = types;
        what[4] = optional;
        }
        else {
            error = true;
            msg += "There is no column specified\n";
        }
        if (!error) {
            Controller.controller(Controller.createTable, what);
            tableName.setText("");
            this.dispose();
        }
        else {
            JOptionPane op = new JOptionPane();
            int messagetype = JOptionPane.ERROR_MESSAGE; 
            op.showMessageDialog(this, msg, "[ERROR] Some fields are missing", messagetype);
        }
        
    }//GEN-LAST:event_acceptButtonActionPerformed