I have an application that uses palettes. These are created using
JWindows that are owned by JFrames. When the application loses focus
(e.g. when I click on the Finder) I want to hide all of my palettes.
Likewise, I want to show my palettes when my application regains
focus (e.g. click on one of its windows or click on its icon in the
dock). The behaviour will then be consistent with other applications
(Pages, Photoshop etc).
Is the best way to just watch for WindowEvents and (using
getOppositeWindow()) establish that if the oppositeWindow is null
that the application is either losing or taking focus. I'm using and
targetting Java 1.4.2.
Or is there a better/easier way?
Best regards,
Ian Cheyne
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden