Código
private threadProgress thread; public SplashWindow() { super(""); // this.WindowDefine(); //Here create the new thread thread = new threadProgress(bar); //Error al declara la bara thread.start(); this.setSize(248,300); this.setVisible(true); //Empty the memory thread = null; } //There Define Window public void WindowDefine(){ //Progress bar.setBorderPainted(true); bar.setStringPainted(true); //Add component in the Layout } //There create the pausa Thread public void pausa (int mSeg){ try { { showError(e); } } } //There a create increment in the Progress bar JProgressBar bar; { super(); this.bar = bar; } public void run(){ for(int i=0; i <= 100; i++) { threadProgress.setValue(i);//Error cuando declaro con setValue pausa(10); } } } }
he probado declarar la barra al principio con
Código
pero lo de setValue no se como arreglarlo