if (isShowPopupDuringSearching()) { if (!comboBox.getUI().getClass().getName().contains("ExComboBoxUI")) { // only cover the JComboBox for now but not the subclass of JComboBox because don't want dependency on ExComboBox in JCL comboBox.hidePopup();
@Override protected void setSelectedIndex(int index, boolean incremental) { if (((JComboBox) _component).getSelectedIndex() != index) { ((JComboBox) _component).setSelectedIndex(index); } if (isShowPopupDuringSearching() || isRefreshPopupDuringSearching()) { if (_component.getClientProperty("ShrinkSearchableSupport") != null && ((JComboBox) _component).isPopupVisible()) { boolean old = isHideSearchPopupOnEvent(); setHideSearchPopupOnEvent(false); ((JComboBox) _component).hidePopup(); setHideSearchPopupOnEvent(old); } try { if (!((JComboBox) _component).isPopupVisible() && KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner() != null && SwingUtilities.isDescendingFrom(KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(), _component)) { ((JComboBox) _component).showPopup(); } } catch (IllegalComponentStateException e) { //null } } }