void (Graphics graphics) { Graphics2D g = (Graphics2D)graphics; final JTextComponent c = getComponent(); final Container parent = c.getParent(); if (c.isOpaque() && parent != null) { g.setColor(parent.getBackground()); g.fillRect(0, 0, c.getWidth(), c.getHeight()); } if (c.getBorder() instanceof MacIntelliJTextBorder) { if (c.isEnabled() && c.isEditable()) { g.setColor(c.getBackground()); Rectangle r = new Rectangle(c.getSize()); JBInsets.removeFrom(r, c.getInsets()); g.fillRect(r.x, r.y, r.width, r.height); } } else { super.paintBackground(g); } }