Swing UI Problem
Hi.
I have a problem with swing UI update. The sample code part is given below. When I press the button, it first sets the progress bar value to 50 and then after completing the time consuming task it sets it to 100. The problem is my progress bar is being showed only when it exits from the actionPerformed function. What I want it to see is the progress bar at 50% while the 20 sec task is being executed. Any suggestions ?
void nextButton_actionPerformed(ActionEvent e)
{
myProgressBar.setValue(50%);
// a set of code which takes about 20 seconds to
// execute
myProgressBar.setValue(100%);
}
Thanks,
JP

