static void addFocusListenerToTree(Component comp) {
comp.addFocusListener(_AWTFocusListener);
if (comp instanceof Container) {
Container cont = (Container)comp;
// Remember to add the listener to child components that are added later.
cont.addContainerListener(_AWTContainerListener);
// Recurse across all child components that are already in the tree now.
int n = cont.getComponentCount();
for (int i = 0; i < n; i++)
addFocusListenerToTree(cont.getComponent(i));
}