I have a dialog that contains a panel with a CardLayout. This panel contains two child panels that I need to be able to switch between upon pressing a dialog button. However, when I call CardLayout.show() in the button's "action performed" handler, nothing (visual) happens! Only after
the event handler exits does the display get updated with the selected card. This is a real problem, because the event handler performs a task that may take several seconds, and the card I'm trying to switch to is supposed to show a progress bar for the task.
Is there any way to get the card layout to update the display immediately from inside the event handler??? I'm using JDK 1.1.6 with Swing components on WinNT 4.0 with JBuilder2.
I've wasted a lot of time trying to find a workaround, but so far I've come up empty handed. PLEASE HELP!!