El error es cuando creó la clase para crear el constructor para el incremento de la Bar que el Eclipse me dice que esta mal el <nameclass>.setValue(i) y cuando llamo al constructor y le paso por variable la barra, aquí esta el código:
public class SplashWindow
extends JFrame{ 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.
setDefaultCloseOperation(JFrame.
EXIT_ON_CLOSE); this.setVisible(true);
//Empty the memory
thread = null;
}
//There Define Window
public void WindowDefine(){
ImageIcon jpg
= new ImageIcon(getClass
().
getResource("splash/EAL69-copia-copia-248x300.jpg")); //Progress
bar.setBorderPainted(true);
bar.
setForeground(new Color(30,
20,
15,
70)); 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
class threadProgress
extends Thread {
{
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
pero lo de setValue no se como arreglarlo