void (Graphics g) { JComponent c = getComponent(); if (ComponentUtil.getParentOfType((Class<? extends JComboBox>)JComboBox.class, (Component)c) != null) return; Graphics2D g2 = (Graphics2D)g.create(); try { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE); Container parent = c.getParent(); if (c.isOpaque() && parent != null) { g2.setColor(parent.getBackground()); g2.fillRect(0, 0, c.getWidth(), c.getHeight()); } if (c.getBorder() instanceof WinIntelliJTextBorder) { paintTextFieldBackground(c, g2); } else if (c.isOpaque()) { super.paintBackground(g); } } finally { g2.dispose(); } }