Where did my focus go?

My popup window has a textfield and a scrollPane with a ListPanel in it. The Listpanel is my own implementation of a list that can contain any component implementing Listable. These listables are usually panels themselves.

If i select anything in the ListPanel ... the textfield loses focus (of course), but i can't find any component in the list that has received the focus. I need to find out if the focus still is in my popup window. Because if it's not i want the window to close.

I guess my question is. Can a Panel have focus? What is necessary for a Component to be able to gain focus?

Is there any more elegant way of detecting if the window is not longer active? (I have tried listening for windowDeactivated events, but none are fired)

[779 byte] By [audus] at [2007-9-26 1:35:52]
# 1
How about adding a FocusListener to the popup window, and in the focusLost(FocusEvent e) method, close the window?
artntek at 2007-6-29 2:20:44 > top of Java-index,Archived Forums,Java Programming...