void () { Container parent = getParent(); if (parent == null || parent instanceof JComponent && Boolean.TRUE == ((JComponent)parent).getClientProperty("JComboBox.isTableCellEditor")) return; Container grandParent = parent.getParent(); if (grandParent != null) { grandParent.repaint(); } }