i have a problem at progressbar with while statement

i have a jframe, a jprogressbar and a jbutton.

so at the code i can not see the steps of the jprogressbar

in this while statement. how can i see the steps of the jprogressbar,

and in java is there any way or any thing like DoEvents function in visual basic.

i need that so much.

thanks for your interesets.

my sample code.

jProgressBar1.setValue(0);

while(true){

jProgressBar1.setValue(jProgressBar1.getValue()+1);

if(jProgressBar1.getValue()>99)break;

try{

Thread.sleep(50);

}catch (Exception e){}

}

Musa YILMAZ

[989 byte] By [musa_yilmaza] at [2007-10-1 5:14:38]
# 1
The GUI thread updates the display.So if you execute this inside the GUI Thread, the value will change, but the display will not update until you return from this method.You need to do this in another thread.
Peter-Lawreya at 2007-7-9 13:07:32 > top of Java-index,Administration Tools,Sun Connection...