boolean () { Container parent = getParent(); if (parent instanceof ComboBox && ((ComboBox<?>)parent).myPaintingNow) { return false; // to disable focus painting around combobox button } return super.hasFocus(); }