@Override
    public void paintIcon(Component component, Graphics g, int x, int y) {
      icon.paintIcon(component, g, x, y);

      if (components != null) {
        components.add(component);
      }
    }
@Override
    public void paintIcon(Component component, Graphics g, int x, int y)