I’m trying to use the super fancy fadeOutComponent that jules has created to implement a cool transition from one tab to another in a tabbed component. The transition works well, but the new tab appears before the old one has finished its transition.
So, I derived my tabbed component from the Timer class as well, and tried running the timer starting in createPanelComponentForTab() to cause the creation of the new tab to wait until the old panel’s distructor has finished its fade.
The problem I’m facing is how to implement a hold in the createPanelComponentForTab() in such a way that I don’t hog the thread and allow the timer to spin. Is there a graceful way to wait x seconds before executing the next line of code in this situation?