if (model.isArmed()) { if (checkIcon instanceof ImageIcon) { ImageIcon image = IconsFactory.createMaskImage(b, checkIcon, Color.BLACK, selectionForeground); image.paintIcon(b, g, checkIconRect.x, checkIconRect.y); ImageIcon image = IconsFactory.createMaskImage(b, checkIcon, Color.BLACK, b.getForeground()); image.paintIcon(b, g, checkIconRect.x, checkIconRect.y);