private static boolean isUnderComboBox(JComponent c) {
    Component parent = c.getParent();
    return parent instanceof JComboBox || (parent != null && parent.getParent() instanceof JComboBox);
  }
private static boolean isUnderComboBox(JComponent c)