Not losing focus for toast messages

I have created a toast messages generator which allows displaying notifications on the desktop’s top right end.
The Toast class extends DocumentWindow.
How can i avoid that my main application window (which also extends DocumentWindow) loses focus whenever a new toast message is opened?
I tried


without any luck.
Thanks for your help!

Why did you derive from DocumentWindow and not just Component?


Your’re right, that solved the problem, thanks a lot!