void (Graphics g, int y, int height, Component owner, Component child) { if (child.isOpaque()) { Color color = child.getBackground(); if (color != null && !color.equals(owner.getBackground())) { g.setColor(color); g.fillRect(0, y, owner.getWidth(), height); } } }