g2d.setPaint(new GradientPaint(0, 0, color, getWidth(), getHeight(),
// The color here is a darker version of the player color.
new Color(Math.min(color.getRed(), DARK_COLOR_CHANNEL_VALUE),
Math.min(color.getGreen(), DARK_COLOR_CHANNEL_VALUE),
Math.min(color.getBlue(), DARK_COLOR_CHANNEL_VALUE)), false));
g2d.fillOval(0, 0, getWidth(), getHeight());
}
};
iconPanel.setMinimumSize(ICON_PANEL_SIZE);
iconPanel.setMaximumSize(ICON_PANEL_SIZE);