comp.paint(g);  comboBox.revalidate();
if (hasFocus && ! isPopupVisible(comboBox)) { comp.setForeground(listBox.getSelectionForeground()); comp.setBackground(listBox.getSelectionBackground()); } else if (comboBox.isEnabled()) { comp.setForeground(comboBox.getForeground()); comp.setBackground(comboBox.getBackground());
  public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)  {    if (! comboBox.isEditable())      {	Object currentValue = comboBox.getSelectedItem();	boolean isPressed = arrowButton.getModel().isPressed();	/* Gets the component to be drawn for the current value.	 * If there is currently no selected item we will take an empty	 * String as replacement.	 */        Component comp = comboBox.getRenderer().getListCellRendererComponent(                listBox, (currentValue != null ? currentValue : ""), -1,                isPressed, hasFocus);        if (! comboBox.isEnabled())          {            comp.setBackground(UIManager.getColor(                "ComboBox.disabledBackground"));            comp.setForeground(UIManager.getColor(                "ComboBox.disabledForeground"));            comp.setEnabled(false);          }        comp.setBounds(0, 0, bounds.width, bounds.height);        comp.setFont(comboBox.getFont());        comp.paint(g);                comboBox.revalidate();      }    else      comboBox.getEditor().setItem(comboBox.getSelectedItem());  }