Class CustomColorImageIcon

  • All Implemented Interfaces:
    Serializable, Accessible, Icon

    public class CustomColorImageIcon
    extends ImageIcon
    A specialized ImageIcon that simply fills in a rectangle with the specified color.
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • CustomColorImageIcon

        public CustomColorImageIcon​(int width,
                                    int height,
                                    Color color)
        Initializes the icon.
        Parameters:
        width - the width
        height - the height
        color - the color for filling
    • Method Detail

      • createImage

        public static BufferedImage createImage​(int width,
                                                int height,
                                                Color color)
        Creates a BufferedImage with the specified dimensions and fills it with the color.
        Parameters:
        width - the width
        height - the height
        color - the color for filling
        Returns:
        the image