boolean (@NotNull ComponentEvent event, @NotNull JComboBox comboBox) { final Component component = event.getComponent(); if(!comboBox.isPopupVisible() || component == null) return false; ComboPopup popup = ReflectionUtil.getField(comboBox.getUI().getClass(), comboBox.getUI(), ComboPopup.class, "popup"); return popup != null && SwingUtilities.isDescendingFrom(popup.getList(), component); }