Implement windowActivated()
in a WindowListener
or WindowAdapter
, as shown in How to Write Window Listeners and this example. See also How to Write a Component Listener.
Addendum: To receive notification that a particular card was selected, use a PropertyChangeEvent
, as shown here, or an AncestorEvent
, as shown here.