Removing and reinstalling mouse listeners would be one of the most
complicated solutions. Brute force is not the answer. It would be far
simpler to subclass JFrame and JDialog to not send events (i.e. consume
them before they're sent to listeners) when the window itself is in the
hidden state. That is, add an event-filtering mechanism. Then you
only
have to tweak code in one place, instead of at every listener/sender
relationship throughout your entire code-base.
why would removing/adding listeners be complicated? If you have one
method that adds all the listeners and another that removes them, these
can be called in setVisible() depending on the parameter. From my point
of view this is easier than adding an event filtering mechanism.
It's probable I'm missing an important design/implementation issue
here, so please would someone explain :)
hoverfrog
_______________________________________________
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