Class FlatButton

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

public class FlatButton extends JButton implements FlatComponentExtension, FlatStyleableComponent
Subclass of JButton that provides easy access to FlatLaf specific client properties.
See Also:
  • Constructor Details

    • FlatButton

      public FlatButton()
  • Method Details

    • getButtonType

      public FlatButton.ButtonType getButtonType()
      Returns type of button.
    • setButtonType

      public void setButtonType(FlatButton.ButtonType buttonType)
      Specifies type of button.
    • isSquareSize

      public boolean isSquareSize()
      Returns whether the button preferred size will be made square (quadratically).
    • setSquareSize

      public void setSquareSize(boolean squareSize)
      Specifies whether the button preferred size will be made square (quadratically).
    • getMinimumWidth

      public int getMinimumWidth()
      Returns minimum width of a component.
    • setMinimumWidth

      public void setMinimumWidth(int minimumWidth)
      Specifies minimum width of a component.
    • getMinimumHeight

      public int getMinimumHeight()
      Returns minimum height of a component.
    • setMinimumHeight

      public void setMinimumHeight(int minimumHeight)
      Specifies minimum height of a component.
    • getOutline

      public Object getOutline()
      Returns the outline color of the component border.
    • setOutline

      public void setOutline(Object outline)
      Specifies the outline color of the component border.

      Allowed Values are:

      • null
      • string "error"
      • string "warning"
      • any color (type Color)
      • an array of two colors (type Color[2]) where the first color is for focused state and the second for unfocused state