go through query progress db showing it on my PB

0
 private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {                                         

        Runnable miRunable = new Runnable() {

            @Override
            public void run() {
barraProgreso.setValue(0);
                try {
                    System.out.println("Me han pulsado");

                    barraProgreso.setValue(33); // Al 33%

                      listar_Tabla_Presentacion();
                    barraProgreso.setValue(66); // Al 66%
                    System.out.println("finalizando");
                    barraProgreso.setValue(100); // Al 100%
                    System.out.println("Terminé");

                } catch (Exception e) {
                    e.printStackTrace();
                }




            }
        };

        Thread hilo_carga_tabla = new Thread(miRunable);
//comenzamos a correr la rutina con el hilo
        hilo_carga_tabla.start();

        btnDelete.setEnabled(false);
        btnUpdate.setEnabled(false);


//double tiempoInicio = System.currentTimeMillis();
// listar_Tabla_Presentacion();
//double tiempoFin = System.currentTimeMillis();
////calculo el tiempo que tardó el código
//double tiempo = tiempoFin - tiempoInicio;
//
//        System.out.println("demoro: " + tiempo);
    }

I would like to know how I can do to have my progress bar scroll through and show the progress of loading the function list_Tabla_Presentacion ();

I was only able to show progress to a certain extent: (

    
asked by Kevin Marshall 03.12.2018 в 16:08
source

0 answers