void (Graphics g, JComponent c) { Graphics2D g2 = (Graphics2D)g.create(); try { Rectangle r = new Rectangle(c.getSize()); if (c.isOpaque()) { Container parent = c.getParent(); if (parent != null) { g2.setColor(DarculaUIUtil.isTableCellEditor(c) && editor != null ? editor.getBackground() : parent.getBackground()); g2.fill(r); } } boolean isOpaque = editor != null && editor.isOpaque(); g2.setColor(getComboBackground(isOpaque)); JBInsets.removeFrom(r, JBUI.insets(DarculaUIUtil.isTableCellEditor(c) ? 1 : 2)); boolean applyAlpha = !(comboBox.isEnabled() || isOpaque && comboBox.isEditable()); if (applyAlpha) { float alpha = comboBox.isEditable() ? 0.35f : 0.47f; g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha)); } g2.fill(r); if (!comboBox.isEditable()) { hasFocus = comboBox.hasFocus(); paintCurrentValue(g2, rectangleForCurrentValue(), hasFocus); } } finally { g2.dispose(); } }