I have a little java app that parses xml files. To set the maximum amount
on my progress bar I first go through the xml files to get element count
totals for all the files. Then, when I actually start parsing the file for
content I fire an event from the startElement(), contentHandler callback
method, that is received by the gui guy listening for these events. Inside
this event handling, I'm updating my progress bar value. The current value
attribute is being set correctly on the progress bar. The problem is that
the gui is not repainted at this time to reflect the changed in appearance
because the AWT event dispatching thread will not give the progressbar time,
I think. Here is the code for the event handler to update the gui. My updateDisplay()
just calls repaint()

public void elementChanged(ElementEvent ee) {
progressPanel.setProgressLabel("Loaded "+ee.getID()"of "+progressPanel.getTotalCount());
progressPanel.setValue(ee.getID());
progressPanel.updateDisplay();
}

How can I update the display of the progress bar inside this method?

Thanks in advance,

Bill