private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        try{
            con=Principal.conexion(con); //inicia conexion
            re=Principal.Result(re);
            ResultSetMetaData datos=re.getMetaData();
            int cont = datos.getColumnCount(); //obtenemos el numero de columnas
            for (int i=1; i <= cont; i++){
                table.addColumn(datos.getColumnLabel(i));
            }
            while (re.next()){
                Object[] k = new Object[cont];
                for (int i=0; i< cont; i++){
                    k[i]=re.getObject(i+1);
                }
                table.addRow(k);
            }
            re.close();
            con.close(); //cerramos conexion
        }
        catch (Exception e){
            e.printStackTrace();
        }
    }//GEN-LAST:event_jButton1ActionPerformed