I have a component ( JPanel ) inside a Window . I always get false when I call panel.isShowing() , when called from the windowGainedFocus() event (when the parent window receives focus).
I assume that when the windowGainedFocus() event is windowGainedFocus() , the JPanel picture inside this Window is not yet complete.
I tried to place this call to isShowing() using the paint() method of this Window , but I always get isShowing() = false .
Is there a way to get an event when the JPanel fully displayed on the screen and the isShowing() method returns true?
thanks
Ran
source share