List of usage examples for java.awt Container isFocusable
public boolean isFocusable()
From source file:com.haulmont.cuba.desktop.gui.components.DesktopWindow.java
protected java.awt.Component getComponentToFocus(java.awt.Container component) { if (component.isFocusable() && component.isEnabled() && DesktopComponentsHelper.isRecursivelyVisible(component)) { if (component instanceof JComboBox || component instanceof JCheckBox || component instanceof JTable || component instanceof JTree) { return component; } else if (component instanceof JTextComponent && ((JTextComponent) component).isEditable()) { return component; }// www.j a v a2s . com } for (java.awt.Component child : component.getComponents()) { if (child instanceof JTabbedPane) { // #PL-3176 // we don't know about selected tab after request // may be focused component lays on not selected tab continue; } if (child instanceof java.awt.Container) { java.awt.Component result = getComponentToFocus((java.awt.Container) child); if (result != null) { return result; } } else { return child; } } return null; }