Determining when a window becomes 'active'

I have an application where the user can have multiple windows displayed.

How can I determine when a window becomes active? - i.e. the user has selected the window by clicking on it, or one of its components.

I have added FocusListeners to the components in the window which works to a certain extent but I don’t think it is a particularity good solution - I would like a generalized event that is fired whenever the entire window becomes active - even if the user simply clicks on the title bar.

Thanks

Is there an answer to this question?
Is there a way to know that all the components have been appeared?

There should be an event when a window comes top-most, IMO. Well worth an enhancement ticket:
Create new ticket

Like an “onload” event (when an entire window is drawn on the client side), or what?

Yes, you got it wright!
An event which fires when all components have been loaded on the client’s screen.

As for the ticket, perhaps it would be more appropriate if mr Schmidt would start it, since he pointed it out.

Thanks.

There’s no need to be afraid of creating tickets, it’s pretty easy :slight_smile: I created a new ticket about the onload issue:
#5998
.

But anyhow, there’s already a ticket about the other issue, plus a related one:
#5039: Window should fire event when it becomes active
and
#5037: It should be possible to make a (sub) window “top-most”
.

@Jouni:
Ok!
next time i will have more courage and i’ll create the ticket myself -_-
Nice to see that the people involved in this forum have passion and they love what they do.
Thanks again.