Class ColorButton

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants

public class ColorButton extends JButton
A JButton which displays a color swatch.
Since:
3.1.0
Author:
Joel Uckelman
See Also:
  • Constructor Details

    • ColorButton

      public ColorButton()
      Create a button with no color.
    • ColorButton

      public ColorButton(Color c)
      Create a button with the specified color.
      Parameters:
      c - the color to set
  • Method Details

    • setColor

      public void setColor(Color c)
      Set the color of the button.
      Parameters:
      c - the color to set