void (Graphics g, Rectangle bounds, boolean hasFocus) { ListCellRenderer<Object> renderer = comboBox.getRenderer(); Component c = renderer.getListCellRendererComponent(listBox, comboBox.getSelectedItem(), -1, false, false); c.setFont(comboBox.getFont()); c.setForeground(comboBox.isEnabled() ? UIManager.getColor("Label.foreground") : UIManager.getColor("Label.disabledForeground")); Rectangle r = new Rectangle(bounds); JComponent jc = (JComponent)c; jc.setBorder(DEFAULT_EDITOR_BORDER); JBInsets.removeFrom(r, jc.getInsets()); // paint selection in table-cell-editor mode correctly boolean changeOpaque = DarculaUIUtil.isTableCellEditor(comboBox) && c.isOpaque(); if (changeOpaque) { jc.setOpaque(false); } else if (c.isOpaque()) { c.setBackground(getComboBackground(true)); } currentValuePane.paintComponent(g, c, comboBox, r.x, r.y, r.width, r.height, c instanceof JPanel); // return opaque for combobox popup items painting if (changeOpaque) { jc.setOpaque(true); } }