Component (final JList list, final Object value, final int index, boolean selected, boolean hasFocus) { hasFocus = selected; // border around inactive items if (!myCommanderPanel.isActive()) { selected = false; } return super.getListCellRendererComponent(list, value, index, selected, hasFocus); }