if (model.isArmed() && model.isPressed())
if ((model.isArmed() && model.isPressed()) || (comboBox.isFocusOwner() && !comboBox.isPopupVisible()))
  public void paintComponent(Graphics g)  {    super.paintComponent(g);    Insets insets = this.getInsets();    int w = getWidth() - (insets.left + insets.right);    int h = getHeight() - (insets.top + insets.bottom);    if (h > 0 && w > 0)      {        int x1 = insets.left;        int y1 = insets.top;        int x2 = x1 + (w - 1);        int y2 = y1 + (h - 1);        int iconWidth = 0;        int iconX = x2;        if (comboIcon != null)          {            iconWidth = comboIcon.getIconWidth();            int iconHeight = comboIcon.getIconHeight();            int iconY;    if (iconOnly)      {                iconX = getWidth() / 2 - iconWidth / 2;                iconY = getHeight() / 2 - iconHeight / 2;      }    else      {                iconX = x1 + (w - 1) - iconWidth;                iconY = y1 + (y2 - y1) / 2 - iconHeight / 2;              }            comboIcon.paintIcon(this, g, iconX, iconY);            if (this.hasFocus())          {            g.setColor(MetalLookAndFeel.getFocusColor());                g.drawRect(x1 - 1, y1 - 1, w + 3, h + 1);              }          }        if (! iconOnly && comboBox != null)          {            ListCellRenderer renderer = comboBox.getRenderer();            boolean pressed = this.getModel().isPressed();            Component comp = renderer.getListCellRendererComponent(listBox,                comboBox.getSelectedItem(), -1, false, false);            comp.setFont(rendererPane.getFont());            if (model.isArmed() && model.isPressed())              {                if (isOpaque())                  {                    comp.setBackground(UIManager.getColor("Button.select"));                    comp.setForeground(comboBox.getForeground());                  }              }            else if (! comboBox.isEnabled())              {                if (this.isOpaque())                  {                    Color dbg =                      UIManager.getColor("ComboBox.disabledBackground");                    comp.setBackground(dbg);                    Color dfg =                      UIManager.getColor("ComboBox.disabledForeground");                    comp.setForeground(dfg);                  }              }            else              {                comp.setForeground(comboBox.getForeground());                comp.setBackground(comboBox.getBackground());              }            int wr = w - (insets.right + iconWidth);            rendererPane.paintComponent(g, comp, this, x1, y1, wr, h);          }                      }                  }