Component comp = comboBox.getRenderer() .getListCellRendererComponent(listBox, (currentValue != null ? currentValue : ""), -1, isPressed, hasFocus); if (! comboBox.isEnabled()) comp.setEnabled(false);  g.translate(borderInsets.left, borderInsets.top); comp.setBounds(0, 0, bounds.width, bounds.height); comp.paint(g); g.translate(-borderInsets.left, -borderInsets.top);  comboBox.revalidate();
Component comp = comboBox.getRenderer().getListCellRendererComponent( listBox, (currentValue != null ? currentValue : ""), -1, isPressed, hasFocus); if (! comboBox.isEnabled()) { comp.setBackground(UIManager.getLookAndFeelDefaults().getColor( "ComboBox.disabledBackground")); comp.setForeground(UIManager.getLookAndFeelDefaults().getColor( "ComboBox.disabledForeground")); comp.setEnabled(false); } comp.setBounds(0, 0, bounds.width, bounds.height); comp.setFont(comboBox.getFont()); comp.paint(g);  comboBox.revalidate();
  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.setEnabled(false);	    g.translate(borderInsets.left, borderInsets.top);	    comp.setBounds(0, 0, bounds.width, bounds.height);	    comp.paint(g);	    g.translate(-borderInsets.left, -borderInsets.top);	    	comboBox.revalidate();      }    else      comboBox.getEditor().setItem(comboBox.getSelectedItem());  }